Saturday, March 21, 2009

ACTION MAILER IN RAILS 2.0

STEP:1

In environment.rb file write it down like this at the end of the file

require 'smtp_tls'
ActionMailer::Base.default_content_type = "text/html"
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:authentication => :login,(ur authentication method name here)
:user_name => "your gmail id ",
:password => "your gmail password ",
}

STEP:2

Include smtp_tls.rb file in lib folder

STEP:3

Follow this url then for
action mailerto work but dont change any configuration files as mentioned in the url for u

No comments: