This project is archived and is in readonly mode.

#3634 ✓stale
LJD

ActionMailer crash

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

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'

Comments and changes to this ticket

  • LJD

    LJD December 30th, 2009 @ 01:02 PM

    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'
    
  • dimas

    dimas January 1st, 2010 @ 12:32 PM

    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'

  • LJD

    LJD January 2nd, 2010 @ 01:27 PM

    dimas, I believe that your problem is a slightly different one. It is covered by ticket #2340. The discussion on that ticket has a workaround that worked for me. It involves adding a modified perform_delivery_smtp method to your project.

  • Rohit Arondekar

    Rohit Arondekar October 7th, 2010 @ 11:55 AM

    • Importance changed from “” to “Low”

    Any updates here? This is still an issue?

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:58 PM

    • 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.

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:58 PM

    • State changed from “open” to “stale”

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages