Sergey Dorofeev wrote: > "Rob Wolfe" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > >> 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. > > 1. If I give m.as_string() into set_payload, result is the same.
The payload of a message/rfc822 is treated like a sequence of length 1. So that works: p2.set_payload([m]) > 2. I don't understand, how message/rfc822 section can accept a list of two > or more messages. Can you explain? That's another question. I don't understand either, why the payload for message/rfc822 has to be a list of length 1 and not a Message object itself. This assumption looks strange to me, too, but I can live with that. :) -- Regards, Rob -- http://mail.python.org/mailman/listinfo/python-list