From: robert.pankowecki@... Date: 2015-10-28T10:38:02+00:00 Subject: [ruby-core:71244] [Ruby trunk - Feature #11629] [Open] Implement Enhanced Mail System Status Codes (rfc1893) Issue #11629 has been reported by Robert Pankowecki. ---------------------------------------- Feature #11629: Implement Enhanced Mail System Status Codes (rfc1893) https://bugs.ruby-lang.org/issues/11629 * Author: Robert Pankowecki * Status: Open * Priority: Normal * Assignee: ---------------------------------------- Here is a list of exceptions raised by `net/smtp.rb` ~~~ def exception_class case @status when /\A4/ then SMTPServerBusy when /\A50/ then SMTPSyntaxError when /\A53/ then SMTPAuthenticationError when /\A5/ then SMTPFatalError else SMTPUnknownError end end ~~~ When the server responds with `Net::SMTPServerBusy: 401 4.1.3 Bad recipient address syntax` it raises `SMTPServerBusy` where it could use the enhanced information and throw a more specific error such as `BadMailboxAddressSyntax` based on what the RFC says: ~~~ X.1.3 Bad destination mailbox address syntax The destination address was syntactically invalid. This can apply to any field in the address. This code is only useful for permanent failures. ~~~ Then it would be easier for the client to catch such specific exceptions and handle them properly instead of dealing with more general ones. -- https://bugs.ruby-lang.org/