Net :: SMTPAuthenticationError(535身份验证失败

时间:2017-08-31 01:10:27

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

我试图在localhost中触发邮件程序,我可以使用gmail而不是使用我自己在Linux Cpanel Godaddy服务器中托管的电子邮件。这是我的development.rb配置:

addr:
loc_74E240

1 个答案:

答案 0 :(得分:0)

端口是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
}