[docs] example in "18.1.11. email: Examples" lacks "Date" field

support at buddyns.com support at buddyns.com
Mon Feb 6 18:46:17 CET 2012


Hi folks,

Just reporting on an improvement point:

The examples in 18.1.11 about how to generate email objects produce
emails lacking the "Date" field. This field is required by RFC2822:
"The only required header fields are the origination date field and
the originator address field(s)."

The fix to the examples' code is trivial:

====================================
msg['Subject'] = "Link"
msg['From'] = me
msg['To'] = you
====================================

-->

====================================
from email.utils import formatdate	# to be added

msg['Subject'] = "Link"
msg['From'] = me
msg['To'] = you
msg['Date'] = formatdate()			# to be added
====================================

cheers
michele
The BuddyNS team

--
Follow the status of BuddyNS @ http://twitter.com/BuddyNS






More information about the docs mailing list