module email

Rob Wolfe rw at smsnet.pl
Wed Jan 24 16:19:28 EST 2007


"Sergey Dorofeev" <sergey at fidoman.ru> writes:

> Hello.
>
> Why does not work?

[...]

> m=email.message.Message()

[...]

> p2=email.message.Message()
> p2.set_type("message/rfc822")
> p2.set_payload(m)

Payload is a _list_ of Message objects (is_multipart() == True)
or a _string_ object (is_multipart() == False) but never just Message object.

http://docs.python.org/lib/module-email.message.html

-- 
HTH,
Rob



More information about the Python-list mailing list