How To Request Delivery Receipts On Emails
waldemar.osuch at gmail.com
Wed Mar 8 19:20:19 CET 2006
Gregory Piñero wrote:
> Does anyone know how to program a Python script to send out emails
> with a request delivery receipt? Is it something I can build into the
> email message via the mime stuff?
You have to add 'Disposition-Notification-To' header
>>> from email.MIMEText import MIMEText
>>> msg = MIMEText('Very important email I need confirmation on')
>>> me = 'returnto at example.com'
>>> msg['From'] = me
>>> msg['To'] = 'workbee at example.com'
>>> msg['Subject'] = 'You better follow up'
>>> msg['Disposition-Notification-To'] = me
Content-Type: text/plain; charset="us-ascii"
From: returnto at example.com
To: workbee at example.com
Subject: You better follow up
Disposition-Notification-To: returnto at example.com
Very important email I need confirmation on
More information about the Python-list