Leave a comment

Perfect write up for sending emails with RoR


Sending email in rails is mange by ActionMailer::Base. The detail of this class is available here. I will show you here to send a simple welcome email. You can read it in more detail here at rubyonrail.org

STEP 1: configuring the mailer in your environment file

First we need to tell our application to handle email request. The basic configuration in your development environment related to action_mailer should look like this

  config.action_mailer.default_url_options = {:host => 'localhost:3000'}config.action_mailer.delivery_method = :smtpconfig.action_mailer.perform_deliveries = true # If set to false, mail will be not delivered in 
  reality, but you can see it in the terminal logs. In development it is false by default, but I 
  suggest to make it true even in development as you can check it directly in your mail box. 
  For testing if you do not want to use a real email id, you can create dummy email 

View original post 785 more words

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: