I have a Rails app configured to use Amazon SES via SMTP. When I try and send email, though, it appears to timeout after a minute, and I get an EOFError. It smells like a configuration issue--the email seems to be constructed fine, and I can send myself test emails from the AWS SES console. This is in sandbox mode, and the app is running in development mode, but both the sending and receiving emails have been verified with SES, and development.rb is set up with this:
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
I've tried a million config variations; this is starting to drive me bananas. Any help or guidance would be very, very appreciated. More details:
The smtp config, which I have in an initializer:
ActionMailer::Base.smtp_settings = {
:address => "email-smtp.us-east-1.amazonaws.com",
:port => "465",
:authentication => :plain,
:enable_starttls_auto => true,
:user_name => "1234",
:password => "abcde"
}
The logs with the error, a bit truncated for brevity:
Sent mail to john@phu.com (59929ms)
Date: Tue, 20 Dec 2011 03:08:37 -0800
From: contact@phu.com
To: john@phu.com
Message-ID: <4ef06cb5ed3c_d73c3fc604c34d4491943@Johns-MacBook-Pro.local.mail>
Subject: Your invitation to Phu
Mime-Version: 1.0
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
<!DOCTYPE html>
....
Completed 500 Internal Server Error in 60564ms
EOFError (end of file reached):
app/controllers/admin_controller.rb:61:in `block in send_invite'
app/controllers/admin_controller.rb:46:in `send_invite'