I've been looking for documentation on the standard behaviour for mail servers who fail to deliver their mail.
I want the 'From' field to be different from the account that receives emails when there is a delivery failure.
E.g.
My program sends an email from 'donotreply@example.com', and on failure to deliver I want to be sent the delivery failure bounceback at 'failedemails@example.com'.
Is this accomplished by setting the reply-to? Or should I login with the 'failedemails' accoun开发者_Python百科t and therefore it will receive the email back?
Thanks.
There are several things you can try, but I think that bounces are typically going to be sent to the envelope sender. This means that sending the mail from donotreply@example.com using your failedemails account is probably your best bet.
You can also try these headers:
Reply-To: failedemails@example.com
Errors-To: failedemails@example.com
Return-Path: failedemails@example.com
A similar question was also asked here: Set email headers so bounced emails go to a specific address
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论