Pages

Wednesday, 9 April 2014

ActioMailer SMTP settings for Gmail

Write the code in config/enviornment.rb or config/application.rb
        config.action_mailer.raise_delivery_errors = true
        config.action_mailer.delivery_method = :smtp

Write after  the config end

      ActionMailer::Base.smtp_settings = {
        :enable_starttls_auto => true,
        :address => "smtp.gmail.com",
        :port => "587",
        :authentication => :login,
        :user_name => "*****",
        :password => "*****"
     }