# Sending mail using action mailer

**URL:** <https://discuss.rubyonrails.org/t/sending-mail-using-action-mailer/50212>\
**Category:** rubyonrails-talk\
**Created:** [March 18, 2010, 11:27am UTC](https://discuss.rubyonrails.org/t/sending-mail-using-action-mailer/50212 "2010-03-18T11:27:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [March 18, 2010, 11:27am UTC](https://discuss.rubyonrails.org/t/sending-mail-using-action-mailer/50212/1 "2010-03-18T11: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:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [March 18, 2010, 11:53am UTC](https://discuss.rubyonrails.org/t/sending-mail-using-action-mailer/50212/2 "2010-03-18T11: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:** ![Bigos](https://avatars.discourse-cdn.com/v4/letter/b/f4b2a3/32.png) [@Bigos](https://discuss.rubyonrails.org/u/Bigos)\
**Post date:** [March 18, 2010, 12:06pm UTC](https://discuss.rubyonrails.org/t/sending-mail-using-action-mailer/50212/3 "2010-03-18T12:06:45Z")

</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:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [March 18, 2010, 12:26pm UTC](https://discuss.rubyonrails.org/t/sending-mail-using-action-mailer/50212/4 "2010-03-18T12: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 Ganesan wrote:
