[Email-SIG] smtplib and getting a copy ?

Lukasz Szybalski szybalski at gmail.com
Fri Apr 14 19:12:50 CEST 2006


On 4/13/06, Matthew Dixon Cowles <matt at mondoinfo.com> wrote:
> 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>'
>
great this is what i needed, and for time i used formatdate()

One last question.
Is there an easy way to covert body of an email into lines starting with ">"

If I received in my payload(), body of an email:
hello
how are you

I want to send a response with quoted part:
hi
>hello
>how are you

Is quote(str) a function that i would use? From description it seems
as it only escapes backslashes and quotes.

Thank you
Lukasz

> Regards,
> Matt
>
>


More information about the Email-SIG mailing list