Skip to content

Conversation

c960657
Copy link

@c960657 c960657 commented Nov 28, 2020

In Net::SMTP, add support for parameters for MAIL FROM and RCPT TO, such as SMTPUTF8 and REQUIRETLS.

I suggest extending Net::SMTP#mailfrom and Net::SMTP#rcpto so they accept an additional optional Array or Hash of parameters.

For Net::SMTP#send_message and Net::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], where addr is the String email address, and params is an Array or Hash of parameters.

In order for the parameters to be useful, we should expose the capabilities reported by EHLO, so capable? should be made public.

@tmtm
Copy link
Collaborator

tmtm commented Dec 3, 2021

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)

@c960657
Copy link
Author

c960657 commented Jun 17, 2022

Implemented in #34.

@c960657 c960657 closed this Jun 17, 2022
@c960657 c960657 deleted the smtp-parameters branch June 17, 2022 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants