我发现这篇文章Using Amazon SES with Rails ActionMailer并按照https://github.com/abronte/Amazon-SES-Mailer上的示例进行操作,但发送邮件时出现此错误
"SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed"
配置/环境/development.rb:
config.action_mailer.delivery_method = AmazonSes::Mailer.new(
:secret_key => 'AKIAJ*******',
:access_key => 'Ahs08*********'
)
发送消息:
mailer = ActionMailer::Base.delivery_method = AmazonSes::Mailer.new(
:secret_key => 'AKI*******',
:access_key => 'Ah***********'
)
mailer.deliver( UserMailer.test(@this_user.email).encoded )
为什么我在这里遇到 SSL 错误?我尝试使用带有个人 gmail 帐户的 smtp 进行另一种配置,并且它可以很好地发送电子邮件。SES有问题吗?我该如何解决?