Mandrill Net::SMTPAuthenticationError: 435 4.7.8 Error: authentication failed
Mandrill Net::SMTPAuthenticationError: 435 4.7.8 Error: authentication failed
在生产环境中通过 Mandrill 发送邮件时遇到问题,在本地主机上一切正常。
我的配置:
config.action_mailer.perform_deliveries = true
config.action_mailer.smtp_settings = {
:port => '587',
:address => 'smtp.mandrillapp.com',
:user_name => 'my_mail@gmail.com',
:password => 'password',
:authentication => 'plain',
:domain => 'http://example.net/',
:enable_starttls_auto => true
}
错误日志:
Net::SMTPAuthenticationError:435 4.7.8 错误:身份验证失败:
from /home/deployer/.rbenv/versions/2.2.1/lib/ruby/2.2.0/net/smtp.rb:976:in `check_auth_response'
from /home/deployer/.rbenv/versions/2.2.1/lib/ruby/2.2.0/net/smtp.rb:740:in `auth_plain'
from /home/deployer/.rbenv/versions/2.2.1/lib/ruby/2.2.0/net/smtp.rb:732:in `authenticate'
from /home/deployer/.rbenv/versions/2.2.1/lib/ruby/2.2.0/net/smtp.rb:567:in `do_start'
from /home/deployer/.rbenv/versions/2.2.1/lib/ruby/2.2.0/net/smtp.rb:520:in `start'
from /home/deployer/apps/shinaswiss/shared/bundle/ruby/2.2.0/gems/mail-2.6.3/lib/mail/network/delivery_methods/smtp.rb:112:in `deliver!'
from /home/deployer/apps/shinaswiss/shared/bundle/ruby/2.2.0/gems/mail-2.6.3/lib/mail/message.rb:2141:in `do_delivery'
from /home/deployer/apps/shinaswiss/shared/bundle/ruby/2.2.0/gems/mail-2.6.3/lib/mail/message.rb:236:in `block in deliver'
:域指定不正确。它应该是 'example.com',而不是“http://example.com/”。
问题出在我的密码上。
在生产过程中,我将普通密码更改为 API KEY,这有助于解决问题。
在生产环境中通过 Mandrill 发送邮件时遇到问题,在本地主机上一切正常。
我的配置:
config.action_mailer.perform_deliveries = true
config.action_mailer.smtp_settings = {
:port => '587',
:address => 'smtp.mandrillapp.com',
:user_name => 'my_mail@gmail.com',
:password => 'password',
:authentication => 'plain',
:domain => 'http://example.net/',
:enable_starttls_auto => true
}
错误日志:
Net::SMTPAuthenticationError:435 4.7.8 错误:身份验证失败:
from /home/deployer/.rbenv/versions/2.2.1/lib/ruby/2.2.0/net/smtp.rb:976:in `check_auth_response'
from /home/deployer/.rbenv/versions/2.2.1/lib/ruby/2.2.0/net/smtp.rb:740:in `auth_plain'
from /home/deployer/.rbenv/versions/2.2.1/lib/ruby/2.2.0/net/smtp.rb:732:in `authenticate'
from /home/deployer/.rbenv/versions/2.2.1/lib/ruby/2.2.0/net/smtp.rb:567:in `do_start'
from /home/deployer/.rbenv/versions/2.2.1/lib/ruby/2.2.0/net/smtp.rb:520:in `start'
from /home/deployer/apps/shinaswiss/shared/bundle/ruby/2.2.0/gems/mail-2.6.3/lib/mail/network/delivery_methods/smtp.rb:112:in `deliver!'
from /home/deployer/apps/shinaswiss/shared/bundle/ruby/2.2.0/gems/mail-2.6.3/lib/mail/message.rb:2141:in `do_delivery'
from /home/deployer/apps/shinaswiss/shared/bundle/ruby/2.2.0/gems/mail-2.6.3/lib/mail/message.rb:236:in `block in deliver'
:域指定不正确。它应该是 'example.com',而不是“http://example.com/”。
问题出在我的密码上。 在生产过程中,我将普通密码更改为 API KEY,这有助于解决问题。