【问题标题】:Net::SMTPAuthenticationError (535 Authentication FailedNet::SMTPAuthenticationError(535 身份验证失败
【发布时间】:2018-02-08 20:07:40
【问题描述】:

我正在尝试在 localhost 中触发一个邮件程序,我可以让它与 gmail 一起使用,但不能与我自己托管在 Linux Cpanel Godaddy 服务器中的电子邮件一起使用。这是我的 development.rb 配置:

config.action_mailer.delivery_method = :smtp
  config.action_mailer.smtp_settings = {
  address: 'smtpout.secureserver.net',
  domain: 'mail.[mydomain].com',
  port:25,
  authentication: 'login',
  user_name:'no-reply@[mydomain].mx',
  password:'mypassword',
  enable_starttls_auto: true
}

【问题讨论】:

    标签: ruby-on-rails email smtp mailer emailrelay


    【解决方案1】:

    端口是 80 而不是 25,并确保您的防火墙没有阻止它

    # config/environments/development.rb
    config.action_mailer.delivery_method = :smtp
    config.action_mailer.smtp_settings = {
      :address => 'smtpout.secureserver.net',
      :domain  => 'www.example.com',
      :port      => 80,
      :user_name => 'yourusername@example.com',
      :password => 'yourpassword',
      :authentication => :plain
    }
    

    【讨论】:

    • 感谢您的回答!我仍然收到身份验证错误。我忘了提到这一点,但我试图在 localhost 中运行它。
    • 是的,此设置适用于您的本地主机(开发环境)
    • 有些区域需要配置为 smtp 地址godaddy.com/help/find-my-server-and-port-settings-6949
    • 我联系了Go Daddy的客服,他们说要配置MX,谢谢
    猜你喜欢
    • 2014-11-02
    • 2021-07-30
    • 2015-04-12
    • 2011-10-11
    • 1970-01-01
    • 1970-01-01
    • 2016-05-13
    • 2013-08-07
    • 1970-01-01
    相关资源
    最近更新 更多