Ruby on rails 通过amazon ses mailer gem发送电子邮件时出现SSL错误

Ruby on rails 通过amazon ses mailer gem发送电子邮件时出现SSL错误,ruby-on-rails,ruby,ruby-on-rails-3,amazon-ses,Ruby On Rails,Ruby,Ruby On Rails 3,Amazon Ses,我找到了这篇文章,并遵循了上的示例,但我在发送邮件时遇到了这个错误 "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

我找到了这篇文章,并遵循了上的示例,但我在发送邮件时遇到了这个错误

    "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错误?我尝试了另一种配置,使用smtp和个人gmail帐户,它可以发送电子邮件。这是SES的问题吗?我该如何解决这个问题?

我想你不再需要SES Mailer宝石了。SES过去仅支持TLS包装,但截至2012年3月7日

正如在第页的答复中所述。它应该像…一样简单

config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
  :address => "email-smtp.us-east-1.amazonaws.com",
  :user_name => "..." # Your SMTP user here.
  :password => "...", # Your SMTP password here.
  :authentication => :login,
  :enable_starttls_auto => true
}

发送时是否使用HTTPS?这里也有同样的错误