0
votes

I found this post Using Amazon SES with Rails ActionMailer and followed the examples found on https://github.com/abronte/Amazon-SES-Mailer but I'm getting this error when sending the mail

    "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*********'
)

sending message:

mailer = ActionMailer::Base.delivery_method = AmazonSes::Mailer.new(
    :secret_key => 'AKI*******',
    :access_key => 'Ah***********'
  )
mailer.deliver( UserMailer.test(@this_user.email).encoded )

Why am I having SSL Errors here? I tried another configuration using smtp with personal gmail account and its sending the email just fine. Is it a problem with SES? How do I fix this?

1
Are you on HTTPS when sending it? Same error here stackoverflow.com/questions/4528101/…Sully

1 Answers

0
votes

I don't think you need the SES Mailer gem anymore. SES used to support TLS wrappers only but as of March 7th 2012...

Amazon SES now supports STARTTLS

As stated in an answer at this SO question. It should be as simple as...

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
}