From: Kero van Gelder Date: 2009-10-21T07:33:51+09:00 Subject: [ruby-core:26190] [Bug #2241] Let Net::SMTP continu when at least one RCPT is accepted Bug #2241: Let Net::SMTP continu when at least one RCPT is accepted http://redmine.ruby-lang.org/issues/show/2241 Author: Kero van Gelder Status: Open, Priority: Normal Category: lib ruby -v: 1.8 as well as 1.9 (sorry for the delay in filing on redmine I had some problems with creating the account; as said, I'm messing with SMTP daemons ;) ) Ruby's Net::SMTP quits when the first Unknown User is encountered. I think Net::SMTP should continue with other RCPTs, then use DATA to let the mail be delivered to existing users. I think this should be so, because - RFC821 mentions clearly in the second paragraph in section 2 "if not, it responds with a reply rejecting that recipient (but not the whole mail transaction)", and - RFC2821 leaves this in the middle, but still gives an example in section D.1 A Typical SMTP Transaction Scenario "C: RCPT TO: S: 250 OK C: RCPT TO: S: 550 No such user here C: RCPT TO: S: 250 OK" So, I wrote code to accomplish this. Please find a patch attached. Comments welcome, especially on the Errors constructed and returned. They are in plain text; I can imagine making the unknown and ok users explicit (arrays within the exception), so that code that uses Net::SMTP has an easier time determining which emails were not sent. Bye, Kero. PS: patch applies to both ruby_1_8 branch and trunk ---------------------------------------- http://redmine.ruby-lang.org