0

我正在尝试在 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
}
4

1 回答 1

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
}
于 2017-08-31T01:31:11.993 回答