Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the :domain symbol referring to when configuring action mailer?

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

  1. 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
  2. I also don't know what the :enable_starttls_auto => true is 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.

like image 671
Spencer Cooley Avatar asked Dec 08 '11 23:12

Spencer Cooley


1 Answers

The :domain key is set up for HELO checking. 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.

like image 85
Ryan Bigg Avatar answered Nov 12 '22 09:11

Ryan Bigg