ActionMailer::Base.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:domain => ???,
:user_name => ???,
:password => ???,
:authentication => "plain",
:enable_starttls_auto => true
}
I’m trying to use Action Mailer in Rails to send email to users. I don’t quite understand what should go into :domain, :user_name, and :password. Should it be gmail.com, my Gmail username, and my Gmail password?
Here is an example of setting up ActionMailer to use GMAil to send mail:
The domain should be “gmail.com” and the username and password should be those of your Google account. To better protect your main GMail account, you should setup a separate GMail account just for sending email.