开发者

sending emails with ruby where the address has a gmail style '+' filter

When I try and send an email say me+test@gmail.com it throws (Net::SMTPSyntaxError) "501 5.1.3 Bad recipient address syntax" is it me or is the syntax checker a little too str开发者_StackOverflow社区ict?

Has anyone come across this before/have a patch for net/smtp?

back trace:

/usr/local/lib/ruby/1.8/net/smtp.rb:679:in `check_response'
/usr/local/lib/ruby/1.8/net/smtp.rb:652:in `getok'
/usr/local/lib/ruby/1.8/net/smtp.rb:634:in `rcptto'
/usr/local/lib/ruby/1.8/net/smtp.rb:545:in `send0'
/usr/local/lib/ruby/1.8/net/smtp.rb:544:in `each'
/usr/local/lib/ruby/1.8/net/smtp.rb:544:in `send0'
/usr/local/lib/ruby/1.8/net/smtp.rb:471:in `sendmail'
/usr/local/lib/ruby/gems/1.8/gems/actionmailer-2.3.5/lib/action_mailer/base.rb:684:in `perform_delivery_smtp'
/usr/local/lib/ruby/1.8/net/smtp.rb:378:in `start'
/usr/local/lib/ruby/gems/1.8/gems/actionmailer-2.3.5/lib/action_mailer/base.rb:682:in `perform_delivery_smtp'
/usr/local/lib/ruby/gems/1.8/gems/actionmailer-2.3.5/lib/action_mailer/base.rb:523:in `__send__'
/usr/local/lib/ruby/gems/1.8/gems/actionmailer-2.3.5/lib/action_mailer/base.rb:523:in `deliver!'


Very quick thought (without research so apologies if I miss the mark!): try single quotes around the address 'me+test@gmail.com' to make it a literal string?

Otherwise, this post seems to address the problem with Exception Notifier Plugin and Rails 2.2.2+.


The problem was upstream - using sendgrid.

Are you sure that's coming from ruby and not from the smtp server? – flyfishr64

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜