No description provided.
Add ability to specify ESMTP options for message
Add ability to specify envelope FROM address
I'm failing to see where the mail_options and rcpt_options properties are being used. The only change I really see is that you've added a new parameter to the send method.
The mail_options and rcpt_options are being used as arguments for sendmail: https://github.com/mattupstate/flask-mail/pull/48/files#diff-a2a3eca3f51cb21c41970efb8c2e96c9R170
Ah, I missed that. Sorry! However, I'm not sure I understand the reason for an API change on the send method.
I'm using VERP technique to be able to handle bounces.
Specifying Return-Path in extra_headers dictionary is not the solution, because the MTAs just replace it with the envelope from address. And it turns out that the only way to have a custom Return-Path address is to use it in the MAIL FROM SMTP command — that's why I needed envelope_from argument.
Yeah, it's quite not obvious and I should have described it earlier :)
I am still failing to see why an extra parameter is needed on the send method. Why not just set message.sender with your desired value or pass it to the Message constructor?
Setting message.sender would change not only the envelope from address (and therefore Return-Path), but the From: header too.
The point is to keep something human-readable in the From: header (say, firstname.lastname@example.org) that is being shown to the recipient and change the envelope from address to something like bounces-<some-base-64-encoded-data>@example.com.
Thanks for helping me understand.