Appname::Application.configure do
config.action_mailer.delivery_method = :smtp
#typical smtp_settings for gmail account
config.action_mailer.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:domain => "domain.of.sender.net",
:authentication => "plain"
:user_name => "spencecooley"
:password => "secret"
:enable_starttls_auto => true
}
end
I have two questions about configuring action mailer
- Do you know what the :domain symbol is referring to? Is it talking about the domain name of the application? Is it talking about the mail server domain? I saw baci.lindsaar.net written in on a few sites that I googled, but I don’t know why people are using that particular domain. List item
- I also don’t know what the
:enable_starttls_auto => trueis doing
update:
Ok, so I found this in the docs in reference to question 2
:enable_starttls_auto – When set to true, detects if STARTTLS is enabled in your SMTP server and starts to use it
Didn’t know what STARTTLS was, so I looked it up here http://en.wikipedia.org/wiki/STARTTLS
update:
I found this in the docs, but still don’t understand
:domain – If you need to specify a HELO domain, you can do it here.
so I guess the new question is: what is a HELO domain? can’t seem to find a clear answer.
The
:domainkey is set up forHELOchecking. You don’t need to specify this if you’re using GMail.The STARTTLS call starts an encrypted connection with your mail server, which is required to use GMail’s SMTP.