1

I have used 'smtp_tls' gem in ruby 1.8.6 and used smtp_settings for sending mail using 'gmail.com' as domain. Now i have to use the same functionality in ruby 1.8.7 and i don't know which gem to use and how to use.

I have tried 'action_mailer_tls' gem too.

Please tell me the gem for mail notification and method for how to use it.

Thanks

1

1 Answer 1

0

in my 1.8.7 ruby project (rails 2.3.5) I have this line in enviroment (because if you want to use gmail, in rails 2.3.x, to send your notification you need to install action_mailer_tls. In rails 3 you don't have to do this because tls is used by default)

config.gem 'action_mailer_tls', :lib => 'smtp_tls.rb'

and in config/initializers/smtp_gmail.rb you can use following setting:

ActionMailer::Base.smtp_settings = {
  :address              => "smtp.gmail.com",
  :port                 => 587,
  :authentication       => :plain,
  :enable_starttls_auto => true,
  :user_name            => "[email protected]",
  :password             => "your_password"

}

1
  • thanks a lot..i have implemented it and your code is also working
    – Naman
    Apr 20, 2011 at 12:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.