Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

ActionMailer crash

#3634

I use ActionMailer to send email to a large number of people. In some cases there are email addresses in the database that are no longer valid. With most smtp servers (e.g. gmail) the emails to the invalid addresses still get sent properly. The emails are bounced back and I can process the bounced emails to mark the addresses as invalid in the database.

Some smtp servers (e.g. DNSExit), seem to be doing address validity checks at the time of the connection. In this case ActionMailer crashes on an invalid email address:

Net::SMTPFatalError (550 5.0.0 bad.address@gmail.com... User unknown
): /usr/local/lib/ruby/1.8/net/smtp.rb:930:in check_response' /usr/local/lib/ruby/1.8/net/smtp.rb:899:ingetok' /usr/local/lib/ruby/1.8/net/smtp.rb:842:in rcptto' /usr/local/lib/ruby/1.8/net/smtp.rb:834:inrcptto_list' /usr/local/lib/ruby/1.8/net/smtp.rb:833:in each' /usr/local/lib/ruby/1.8/net/smtp.rb:833:inrcptto_list' /usr/local/lib/ruby/1.8/net/smtp.rb:654:in sendmail' /usr/local/lib/ruby/1.8/net/smtp.rb:526:instart' app/controllers/mail_controller.rb:115:in send_email'

Reported by LJD · December 30th, 2009 @ 12:38 PM

State: stale
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. LJD
    LJD

    Formatted log:

    Net::SMTPFatalError (550 5.0.0 bad.address@gmail.com... User unknown):
    /usr/local/lib/ruby/1.8/net/smtp.rb:930:in `check_response'
    /usr/local/lib/ruby/1.8/net/smtp.rb:899:in `getok'
    /usr/local/lib/ruby/1.8/net/smtp.rb:842:in `rcptto'
    /usr/local/lib/ruby/1.8/net/smtp.rb:834:in `rcptto_list'
    /usr/local/lib/ruby/1.8/net/smtp.rb:833:in `each'
    /usr/local/lib/ruby/1.8/net/smtp.rb:833:in `rcptto_list'
    /usr/local/lib/ruby/1.8/net/smtp.rb:654:in `sendmail'
    /usr/local/lib/ruby/1.8/net/smtp.rb:526:in `start'
    app/controllers/mail_controller.rb:115:in `send_email'
    

    December 30th, 2009 @ 01:02 PM

  2. dimas
    dimas

    I also got an error that i think has correlation with that.
    I've tried to find out, why this error occured, many people said that the error caused by removing bracket on from option, "sender sender@mail.com" to "sender@mail.com" only, but it's not worked.

    This is the stack trace of my error:

    Net::SMTPFatalError (555 5.5.2 Syntax error. 20sm15207659pzk.1
    ): /usr/local/lib/ruby/1.8/net/smtp.rb:930:in check_response' /usr/local/lib/ruby/1.8/net/smtp.rb:899:ingetok' /usr/local/lib/ruby/1.8/net/smtp.rb:842:in rcptto' /usr/local/lib/ruby/1.8/net/smtp.rb:834:inrcptto_list' /usr/local/lib/ruby/1.8/net/smtp.rb:833:in each' /usr/local/lib/ruby/1.8/net/smtp.rb:833:inrcptto_list' /usr/local/lib/ruby/1.8/net/smtp.rb:654:in sendmail' /usr/local/lib/ruby/1.8/net/smtp.rb:526:instart' /usr/local/lib/ruby/1.8/net/smtp.rb:463:in start' app/models/user.rb:99:ininvite_manually' app/models/user.rb:97:in each' app/models/user.rb:97:ininvite_manually' app/controllers/dashboard_controller.rb:106:in send_invitation_manually'

    January 1st, 2010 @ 12:32 PM

  3. LJD
    LJD

    dimas, I believe that your problem is a slightly different one. It is covered by ticket #2340 action mailer can't deliver mail via smtp on ruby 1.9.1 or 1.8.7. The discussion on that ticket has a workaround that worked for me. It involves adding a modified perform_delivery_smtp method to your project.

    January 2nd, 2010 @ 01:27 PM

  4. Rohit Arondekar
    Rohit Arondekar
    • Importance changed from to Low

    Any updates here? This is still an issue?

    October 7th, 2010 @ 11:55 AM

  5. Santiago Pastorino
    Santiago Pastorino
    • State changed from new to open

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

    February 2nd, 2011 @ 04:58 PM

  6. Santiago Pastorino
    Santiago Pastorino
    • State changed from open to stale

    February 2nd, 2011 @ 04:58 PM