module documentation

Support for bounce message generation.

Function generateBounce Generate a bounce message for an undeliverable email message.
Constant BOUNCE_FORMAT Undocumented
def generateBounce(message, failedFrom, failedTo, transcript='', encoding='utf-8'): (source)

Generate a bounce message for an undeliverable email message.

Parameters
message:a file-like objectThe undeliverable message.
failedFrom:bytes or unicodeThe originator of the undeliverable message.
failedTo:bytes or unicodeThe destination of the undeliverable message.
transcript:bytes or unicodeAn error message to include in the bounce message.
encoding:str or unicodeEncoding to use, default: utf-8
Returns
3-tuple of (1) bytes, (2) bytes, (3) bytesThe originator, the destination and the contents of the bounce message. The destination of the bounce message is the originator of the undeliverable message.
BOUNCE_FORMAT: str = (source)

Undocumented

Value
'''From: postmaster@{failedDomain}
To: {failedFrom}
Subject: Returned Mail: see transcript for details
Message-ID: {messageID}
Content-Type: multipart/report; report-type=delivery-status;
    boundary="{boundary}"

...