Suresh Payankannur

Tuesday, August 16, 2011

Yahoo Mail with ActionMailer using Amazon Elastic IP

I have been struggling to send email from an EC2 instance using Yahoo mail. The following setup finally works.

  1. Get an Elasic IP from Amazon
  2. Have a domain assigned to the IP
  3. Request Amazon to create reverse DNS records using this form
  4. Make sure your IP is not blacklisted by checking the DNSBL lists
  5. Run the following test program to make sure that the SMTP works from your EC2 instance
  6. require 'rubygems'
    require 'action_mailer'
    ActionMailer::Base.delivery_method = :smtp
    ActionMailer::Base.smtp_settings = {
      :tls            => true,
      :address        => "",
      :port           => 587,
      :authentication => :plain,
      :user_name      => "<>",
      :password       => "<your-yahoo-email-password>"
    class Mailer < ActionMailer::Base
      def do_send
        subject    "Test Mail"
        recipients "<email-to>"
        from       "<>"
        body       "Test email from EC2"


Post a Comment

Blog Archive

Scroll To Top