Bug #2241
closedLet Net::SMTP continu when at least one RCPT is accepted
Description
=begin
(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:Jones@foo.com
S: 250 OK
C: RCPT TO:Green@foo.com
S: 550 No such user here
C: RCPT TO:Brown@foo.com
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
=end
Files