Improve From header when sending email
We have different strategy to set the From
header when sending an email.
When the address comes from the configuration we can expect it to work with the configured server and indeed we use it with sendmail
.
But when it comes from the user input indeed we should not trust that it is a working email for the server. For example this is managed by ir.email
which keep the configured From
and set Reply-To
(and Behalf-Of
which should be On-Behalf-Of
but anyway it is not standard). But we could do better because if the address has the same domain as the configured one, so we can use Sender
header which appear nicer.
So the proposal is to add a tool to trytond
to set the best headers to a message base on the addresses used.