Project

General

Profile

Actions

Feature #4598

closed

Net::SMTP should raise more helpfully when mail can't send

Added by tkieft (Tyler Kieft) almost 13 years ago. Updated almost 12 years ago.

Status:
Closed
Target version:
-
[ruby-core:35854]

Description

=begin
Net::SMTP, in function check_continue? (line 952) raises "could not get 3xx (STATUS_CODE)" when it receives anything except a 300-399 (continue) code from the SMTP server. This is extremely unhelpful for users of the library, as the mail server usually sends an explanatory message that isn't passed along.

Suggest that it should be something like:

def check_continue(res)
unless res.continue?
raise SMTPUnknownError, "could not get 3xx (#{res.status}: #{res.string})"
end
end

=end

Updated by mame (Yusuke Endoh) about 12 years ago

  • Description updated (diff)
  • Status changed from Open to Assigned
  • Assignee set to aamine (Minero Aoki)

Updated by mame (Yusuke Endoh) almost 12 years ago

  • Assignee changed from aamine (Minero Aoki) to mame (Yusuke Endoh)

Looks good. At least, I think the fix is benign.
I'll commit it unless there is objection.

--
Yusuke Endoh

Actions #3

Updated by mame (Yusuke Endoh) almost 12 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r35464.
Tyler, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • lib/net/smtp.rb (check_continue): raise an error with an explanatory
    message. [ruby-core:35854] [Feature #4598]
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0