Monday, October 12, 2009

Rails ActionMailer Setup for Yahoo SMTP

I have been working on a new project lately. Today I decided to setup email notification system for it. I first thought of using AuthSmtp ( to send out emails to users but then I opted for yahoo email where I had also registered the domain.

I setup a new email address from which I am going to send out emails to the users of my system. Like activation emails, new message notifications, etc.

But the code kept throwing"Errno::ECONNRESET (Connection reset by peer):' error whenever I tried to connect to yahoo's smtp server and send a message. It took me a while to figure what the problem was: Yahoo told me to use port 465; whereas the correct port number to use is 587!

So to save you couple of hours filled with frustration and hair pullings, here's the action_mailer setup that works:

ActionMailer::Base.default_charset = "utf-8"
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address => "",
:port => 587,
:domain => "",
:user_name => "",
:password => "some-password" ,
:enable_starttls_auto => true,
:authentication => :plain


  1. We [url=]roulette[/url] have a ample library of unqualifiedly unconditional casino games in regard to you to challenge opportunely here in your browser. Whether you appetite to training a provisions game strategy or honest try out a occasional new slots before playing in the direction of unfeigned filthy lucre, we be undergoing you covered. These are the rigid uniform games that you can play at real online casinos and you can part of them all in requital for free.

  2. n fact there are reminder or intimation mails as well which reminds users to change their password. This is one of the most important measures to maintain safety and security of email accounts.