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
Updated by nobu (Nobuyoshi Nakada) over 14 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
=begin
This issue was solved with changeset r27374.
Kero, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
=end
Updated by dmarkow (Dylan Markow) over 14 years ago
=begin
There is a typo in this -- line 842 of lib/net/smtp.rb should reference "ok_users" not "ok_addrs"
=end