mailcatcher: Net::SMTPFatalError (550 Message rejected)
I’m having an issue on my machine that my other developers aren’t getting with the exact same code base. When sending via smtp in Rails and using mail catcher I’m getting 550s. The mail does show up in mailcatcher, however, it looks like a mime attachment instead of an html message.
$ mailcatcher -f -v Starting MailCatcher ==> smtp://127.0.0.1:1025 ==> http://127.0.0.1:1080 *** Error receiving message: {:sender=>"<me@example.com>", :recipients=>["<m e@example.com>"], :source=>""} Exception: undefined method `match' for nil:NilClass Backtrace: /Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/mail-2.4.4/lib/mail/utilities.rb:104:in `unbracket'
/Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/mail-2.4.4/lib/mail/part.rb:29:in `cid'
/Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/mailcatcher-0.5.10/lib/mail_catcher/mail.rb:51:in `block in add_message'
/Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/mailcatcher-0.5.10/lib/mail_catcher/mail.rb:48:in `each'
/Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/mailcatcher-0.5.10/lib/mail_catcher/mail.rb:48:in `add_message'
/Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/mailcatcher-0.5.10/lib/mail_catcher/smtp.rb:45:in `receive_message'
/Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/eventmachine-1.0.0/lib/em/protocols/smtpserver.rb:532:in `process_data_line'
/Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/eventmachine-1.0.0/lib/em/protocols/smtpserver.rb:196:in `receive_line'
/Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/eventmachine-1.0.0/lib/em/protocols/linetext2.rb:64:in `receive_data'
/Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run_machine' /Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/eventmachine-1.0.0/lib/eventmachine.rb:187:in `run' /Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/mailcatcher-0.5.10/lib/mail_catcher.rb:134:in `run!' /Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/mailcatcher-0.5.10/bin/mailcatcher:4:in `<top (required)>' /Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/bin/mailcatcher:19:in `load' /Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/bin/mailcatcher:19:in `<main>'
.
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Comments: 34 (12 by maintainers)
Recently ran into this issue on mail 2.4.3 (not sure if it has been fixed yet), but the problem for me was that the auto generated content-id contains your computer hostname, and my computer hostname had an illegal character (apostrophe) in it, causing the auto generated content-id to fail at parsing.
The fix is to change your computer hostname to something without illegal characters. For mac: scutil --set HostName YOUR_NEW_HOSTNAME
Done. https://github.com/mikel/mail/issues/1073