Zoho ActionMailer Rails 5.0.1
Zoho ActionMailer Rails 5.0.1
使用 Zoho 从 rails 应用程序发送电子邮件需要什么配置?
使用此配置:
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address => 'smtp.zoho.com',
:port => 465,
:user_name => ENV['NOREPLY_USERNAME'],
:password => ENV['NOREPLY_PASSWORD'],
:authentication => :login,
:ssl => true,
:tls => true,
:enable_starttls_auto => true
}
我收到这个错误:
Net::SMTPAuthenticationError(535 认证失败):
使用相同的配置,但端口 587 相反,我收到此错误:
OpenSSL::SSL::SSLError(SSL_connect 返回=1 errno=0 状态=未知状态:未知协议):
我已经确定 NOREPLY_USERNAME 和 NOREPLY_PASSWORD 是正确的值。
如有任何帮助,我们将不胜感激。
给 Zoho 发了邮件,他们告诉我他们检查过我的电子邮件是在欧洲托管的,所以他们告诉我更改为 smtp.zoho.eu 并使用 465 SSL 或 587 TLS。 smtp.zoho.eu 使用 465 SSL,没有错误,邮件发送成功。
使用 Zoho 从 rails 应用程序发送电子邮件需要什么配置?
使用此配置:
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address => 'smtp.zoho.com',
:port => 465,
:user_name => ENV['NOREPLY_USERNAME'],
:password => ENV['NOREPLY_PASSWORD'],
:authentication => :login,
:ssl => true,
:tls => true,
:enable_starttls_auto => true
}
我收到这个错误: Net::SMTPAuthenticationError(535 认证失败):
使用相同的配置,但端口 587 相反,我收到此错误: OpenSSL::SSL::SSLError(SSL_connect 返回=1 errno=0 状态=未知状态:未知协议):
我已经确定 NOREPLY_USERNAME 和 NOREPLY_PASSWORD 是正确的值。
如有任何帮助,我们将不胜感激。
给 Zoho 发了邮件,他们告诉我他们检查过我的电子邮件是在欧洲托管的,所以他们告诉我更改为 smtp.zoho.eu 并使用 465 SSL 或 587 TLS。 smtp.zoho.eu 使用 465 SSL,没有错误,邮件发送成功。