Closed c960657 closed 2 years ago
Thank you. But this code doesn't work properly.
For example:
Net::SMTP.start("127.0.0.1"){|m| m.send_message("test", "sender", ["rcpt", ["foo=bar"]])}
It treats that foo=bar
as the recipient.
550 5.1.1 <foo=bar>: Recipient address rejected: User unknown in local recipient table (Net::SMTPFatalError)
Implemented in #34.
In
Net::SMTP
, add support for parameters forMAIL FROM
andRCPT TO
, such as SMTPUTF8 and REQUIRETLS.I suggest extending
Net::SMTP#mailfrom
andNet::SMTP#rcpto
so they accept an additional optional Array or Hash of parameters.For
Net::SMTP#send_message
andNet::SMTP#open_message_stream
, I suggest that in addition to a String email address (or arrays of Strings), these methods should accept a pair (or arrays of pairs) of[addr, params]
, whereaddr
is the String email address, andparams
is an Array or Hash of parameters.In order for the parameters to be useful, we should expose the capabilities reported by
EHLO
, socapable?
should be made public.