代码之家  ›  专栏  ›  技术社区  ›  Frocky Garcia

通过smtp发送的Rails 3.2电子邮件被gmail标记为未加密

  •  1
  • Frocky Garcia  · 技术社区  · 8 年前

    我想问一下我错过了什么,为什么我的电子邮件被Gmail标记为未加密。我的项目使用Hostmonster。com没有回复帐户发送电子邮件。

    Rails smtp设置:

    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
    }
    

    主机怪兽cpanel: enter image description here

    该项目已在HTTPS中。我不知道这到底是导致Gmail未加密问题还是主机怪物。 enter image description here

    1 回复  |  直到 8 年前
        1
  •  1
  •   MatouÅ¡ Borák    8 年前

    我认为这与配置有关 托管SMTP服务器的 当与GMail服务器通话时。您正在通过加密的SMTP连接将电子邮件发送到hostmonster SMTP服务器,这是正确的。但主机怪物也有责任进一步发送加密邮件,而他们可能不会这样做。

    我会就此问题联系hostmonster的支持人员,即询问他们在从服务器发送电子邮件时是否使用加密通信。