Pylons / pyramid_mailer

A package for sending email from your Pyramid application
https://docs.pylonsproject.org/projects/pyramid-mailer/en/latest/
Other
50 stars 40 forks source link

added support for a different sender in the SMTP envelope than the sender #92

Open Estartu opened 5 years ago

Estartu commented 5 years ago

It's good practice on automatic generated mails to haven automatic error handling. To be able to have errors while delivering the Mail automatically handled is to have a e-mail address that processes bounces. The sender of a mail should be an address where a human reads the Mails.

So we need two different senders on one mail. One that is only used while delivering the mail and on the recipient sees a sender of this mail.

Most do this by using the automatic bounce processing address as envelop from and the human address in the From: header. So the recipient of the Mails only see the Human address but the delivery system sees the automatic address as sender.

The Errors-To: header isn't really supported and the automatic address as sender and the human address as Reply-To: do work most of the times but exposes the automatic address as sender is usualy a unreadable address.

digitalresistor commented 5 years ago

How does this change work when you send the messages to file to be sent at a later point in time? AFAIK this would only work for sending messages directly to SMTP.

Estartu commented 5 years ago

How does this change work when you send the messages to file to be sent at a later point in time? AFAIK this would only work for sending messages directly to SMTP.

yes, it only works right now, when directly sending the mail. I don't think it would be a problem to implement it for queuing as well.