[Email-SIG] smtplib and getting a copy ?
Matthew Dixon Cowles
matt at mondoinfo.com
Fri Apr 14 00:21:51 CEST 2006
[Sorry, originally sent this reply directly]
Dear Lukasz,
> Is message id generated by sending server or receiving server?
It's intended to be created by the program that sends the mail, but
it's technically optional. The details are at:
http://www.faqs.org/rfcs/rfc2822.html
If the sending program doesn't create a Message-ID header, one will
likely be added by some intermediate server.
> I could create a time stamp, but not sure about message id.
Python's email module has a convenience function to create one that
should be sufficient. It's documented at:
http://docs.python.org/lib/module-email.Utils.html
For example:
>>> import email.Utils
>>> email.Utils.make_msgid()
'<20060413221549.2140.4129 at mint-julep.mondoinfo.com>'
Regards,
Matt
More information about the Email-SIG
mailing list