【发布时间】:2012-07-17 06:09:44
【问题描述】:
我发现这篇文章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"
config/environments/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有问题吗?我该如何解决这个问题?
【问题讨论】:
-
发送时是否使用 HTTPS?同样的错误stackoverflow.com/questions/4528101/…
标签: ruby-on-rails ruby ruby-on-rails-3 amazon-ses