-
-
Notifications
You must be signed in to change notification settings - Fork 177
Change _MailMixin.send signature and procedure #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
1) Add the parameter `envelope_from=None` to be able to modify the envelope from from client code. The former version had `envelope_from` parameter only in `Connection.send` and it was impossible to call from client code without hacking a little. 2) In order to use this parameter, the mail is sent using the `connection` object instead of the `message` object. This also reduce one level of innecesary indirection (`Message.send` only does `connection.send(self)`)
|
There was no simple way to call |
|
is this actually the need to differentiate between |
|
The need arose when we wanted to redirect bounce emails to another account. Say [email protected] sends an email to a client, but that client's email not longer exists, so the server will return a bounce email saying that the mail was not found. That mail is normally sent to the "envelope-form" field which is almost always the same as the sender. In our case, we wanted to track this in another mail account so there's the motivation to the pull request. |
|
that sounds exactly like the scenario for differentiating |
|
Hi, any feedbacks on this? Can I help somehow? This is a very simple change but I will be glad to provide some tests if needed or help in something. |
|
@pbu88 I'm open to exposing this better from the Message class rather than by |
|
We could add an This will deprecate the need for an The actual use case for this is not only hiding the originator mail (or changing it). It's main purpose is control the bounce when the mail failed to deliver. I'll love to hear some feedback about this :) |
|
Actually, I'm not that comfortable with including |
Add the parameter
envelope_from=Noneto be able to modify the envelope fromfrom client code. The former version had
envelope_fromparameter only inConnection.sendand it was impossible to call from client code without hackinga little.
In order to use this parameter, the mail is sent using the
connectionobject instead of the
messageobject. This also reduce one level of innecesaryindirection (
Message.sendonly doesconnection.send(self))