Search code examples
ruby-on-railsruby-on-rails-3.2smtpgmailactionmailer

Rails 3.2 email sent via smtp is flagged as unencrypted by gmail


I would like to ask what I missed why my email was flagged as unencrypted by Gmail. My project uses Hostmonster.com no-reply account to send email.

Rails smtp settings:

config.action_mailer.default_url_options = { host: APP_CONFIG[:host], port: APP_CONFIG[:port], protocol: "https" }
config.action_mailer.perform_deliveries = true
config.action_mailer.delivery_method = :smtp 
config.action_mailer.smtp_settings = {
    :address                => "host289.hostmonster.com",
    :port                   => 465,
    :domain                 => APP_CONFIG[:smtp][:domain],
    :user_name              => APP_CONFIG[:smtp][:user_name],
    :password               => APP_CONFIG[:smtp][:password],
    :authentication         => "plain",
    :enable_starttls_auto => true,
    :ssl => true
}

Hostmonster cpanel: enter image description here

The project is already in HTTPS. I don't know if it's in my end causing the Gmail unencrypted issues or on hostmonster. enter image description here


Solution

  • I believe this is rather about the configuration of the hosting SMTP server when talking to GMail servers. You are sending your email to the hostmonster SMTP server via encrypted SMTP connection, which is correct. But it's the hostmonster's responsibility to also send the mail encrypted further on, which they probably don't do.

    I would contact the hostmonster's support about this issue, i.e. ask them if they use encrypted communication when sending outgoing emails from their servers.