1

我正在运行mailcatcher以查看通过 smtp 在 Rails 项目上发送的邮件,但是在我的机器上,当我发送电子邮件时,我收到了:

Net::SMTPFatalError (550 Message rejected)

该消息仍显示在 mailcatcher 中,但看起来文本显示为附件而不是 html。

如果我在前台以详细模式运行 mailcatcher mailcatcher -f -v,我会得到以下堆栈跟踪:

    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/em/protocols/linetext2.rb:65:in `receive_data'
       /Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/eventmachine-1.0.0/lib/em/protocols/linetext2.rb:65:in `receive_data'
       /Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/eventmachine-1.0.0/lib/em/protocols/linetext2.rb:65:in `receive_data'
       /Users/matt/.rvm/gems/ruby-1.9.3-p194@merchant_messaging/gems/eventmachine-1.0.0/lib/em/protocols/linetext2.rb:65: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>'

显然我不是唯一一个有这个问题的人。有关更多信息,请参阅此 github 问题https://github.com/sj26/mailcatcher/issues/73

4

0 回答 0