0

RailsActionMailerでAmazonSESを使用してこの投稿を見つけ、 https://github.com/abronte/Amazon-SES-Mailerにある例に従いましたが、メールを送信するとこのエラーが発生します

    "SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed"

config / environment / 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に問題がありますか?これを修正するにはどうすればよいですか?

4

1 に答える 1

0

SESメーラーの宝石はもう必要ないと思います。SESはTLSラッパーのみをサポートするために使用されていましたが、2012年3月7日現在...

AmazonSESがSTARTTLSをサポートするようになりました

このSOの質問の回答で述べられているように。それは次のように単純でなければなりません...

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
}
于 2012-07-18T08:49:57.303 に答える