Send email in Rails 2.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • divyakgowda
    New Member
    • Oct 2007
    • 19

    Send email in Rails 2.0

    Hello,
    I am using Rails 2.0 in which i want to send email.Where do i configure the gmail settings?If i add the settings in environment.rb file as older version,the application is not running.I am using tlsmail gem.Please help me to solve this.I need this setting to be added in rails 2.0
    Code:
    require 'tlsmail'
    Net::SMTP.enable_tls(OpenSSL::SSL::VERIFY_NONE)
    
    ActionMailer::Base.delivery_method = :smtp
    ActionMailer::Base.server_settings = {
    :address => 'smtp.gmail.com',
    :tls => 'true',
    :port => 587,
    :domain => 'gmail.com',
    :authentication => :plain,
    :user_name => ' ',
    :password => ' '
    }
    Thanks.

    Regards,
    amulyab
    Last edited by eWish; Jan 28 '09, 02:57 AM. Reason: Please use the code tags
  • improvcornartist
    Recognized Expert Contributor
    • May 2007
    • 303

    #2
    Google gave me these pages that might have some helpful info: link, link

    Also, please use code tags when posting code in the future. They make the code stand out and make it easier to read.

    Comment

    Working...