# Sending mail using action mailer

**URL:** <https://www.ruby-forum.com/t/sending-mail-using-action-mailer/185335>\
**Category:** Rails\
**Created:** [March 18, 2010, 12:27pm UTC](https://www.ruby-forum.com/t/sending-mail-using-action-mailer/185335 "2010-03-18T12:27:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![saravanand](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8491ac/32.png) [@saravanand](https://www.ruby-forum.com/u/saravanand)\
**Post date:** [March 18, 2010, 12:27pm UTC](https://www.ruby-forum.com/t/sending-mail-using-action-mailer/185335/1 "2010-03-18T12:27:32Z")

</div>

Hi everyone,

I am new to ruby and i just wanna send an email using ruby action  
mailer. i have been trying it for about a day. Not achieved. so many  
replies came in from google but many were beating the bushes …

can any one send me a correct procedure…

regards

ds

---

<div class="post-metadata">

**Author:** ![saravanand](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8491ac/32.png) [@saravanand](https://www.ruby-forum.com/u/saravanand)\
**Post date:** [March 18, 2010, 12:53pm UTC](https://www.ruby-forum.com/t/sending-mail-using-action-mailer/185335/2 "2010-03-18T12:53:16Z")

</div>

Saravanan Doraiswamy wrote:

> Hi everyone,
> 
> I am new to ruby and i just wanna send an email using ruby action  
> mailer. i have been trying it for about a day. Not achieved. so many  
> replies came in from google but many were beating the bushes …
> 
> can any one send me a correct procedure…
> 
> regards
> 
> ds

Refer the below URL:  
[http://ruby-doc.org/stdlib/libdoc/net/smtp/rdoc/index.html](http://ruby-doc.org/stdlib/libdoc/net/smtp/rdoc/index.html)

At the starting of the page itself, an example code is given for sending  
mail.

---

<div class="post-metadata">

**Author:** ![saravanand](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8491ac/32.png) [@saravanand](https://www.ruby-forum.com/u/saravanand)\
**Post date:** [March 18, 2010, 1:08pm UTC](https://www.ruby-forum.com/t/sending-mail-using-action-mailer/185335/3 "2010-03-18T13:08:13Z")

</div>

if it is not enough, look for clues in log files in railsapp/log  
making sure you check logs relevant to mode you run your app, eg.  
development.log  
if there’s nothing there you need to configure your railss application  
to send mails and report errors.

My railsapp/config/environments/development.rb also has following

config.action\_mailer.raise\_delivery\_errors = true  
config.action\_mailer.perform\_deliveries = true  
config.action\_mailer.delivery\_method = :sendmail ####

As regards delivery\_method it might be different on your system if you  
don’t have email server installed on it.  
You can find documentation how to configure rails to use googlemail,  
so it should be easy to adapt it to your needs

Hope it helps.

Jacek

---

<div class="post-metadata">

**Author:** ![saravanand](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8491ac/32.png) [@saravanand](https://www.ruby-forum.com/u/saravanand)\
**Post date:** [March 18, 2010, 1:26pm UTC](https://www.ruby-forum.com/t/sending-mail-using-action-mailer/185335/4 "2010-03-18T13:26:02Z")

</div>

Hi,

In this mean time, i downloaded a youtube video and followed the  
procedure, now i am getting this error :

E:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active\_support/dependencies.rb:105:in  
`const_missing' E:/Users/Jithu/RubyMails/gmailer/app/controllers/notifications_controller.rb:3:in `create’

can you help me get out of this

regards,

ds

Loganathan G. wrote:

> Saravanan Doraiswamy wrote:
> 
> > Hi everyone,
> > 
> > I am new to ruby and i just wanna send an email using ruby action  
> > mailer. i have been trying it for about a day. Not achieved. so many  
> > replies came in from google but many were beating the bushes …
> > 
> > can any one send me a correct procedure…
> > 
> > regards
> > 
> > ds
> 
> Refer the below URL:  
> [http://ruby-doc.org/stdlib/libdoc/net/smtp/rdoc/index.html](http://ruby-doc.org/stdlib/libdoc/net/smtp/rdoc/index.html)
> 
> At the starting of the page itself, an example code is given for sending  
> mail.
