Thanks, it's working now :) In case someone wants to know, I will be converting my .eml source file to a message object using this call: IConverterSession::MIMEToMAPI (outlook 2003+) http://msdn.microsoft.com/en-us/library/aa193062(office.11).aspx
Since not all calls are available using python, I will use a C++ wrapper which looks something like this: std::wstring ConvertMIMEToMAPI(const std::wstring& p_rSourceFilename); Where the return value is a filename containing a compoung object (CLSID_MailMessage) which I hope I will be able to read back in python. Laurent On Thu, 07 Jan 2010 15:52:05 +1100, Mark Hammond <skippy.hamm...@gmail.com> wrote: > On 7/01/2010 6:15 AM, lduchesne wrote: >> >> Hi, >> >> I'm tying to embed a mail message in another mail using the following >> code: >> >> [...] >> imsg = draftFolder.CreateMessage(None, 0) >> message = outboxFolder.CreateMessage(None, 0) >> attach = message.CreateAttach(None, 0) >> >> attach[1].SetProps([(mapitags.PR_ATTACH_METHOD, >> mapi.ATTACH_EMBEDDED_MSG), >> (mapitags.PR_ATTACH_DATA_OBJ, imsg), >> (mapitags.PR_DISPLAY_NAME, filename), >> (mapitags.PR_ATTACH_LONG_FILENAME, filename)]) > > You will need something like: > > attachMsg = imsg.OpenProperty(mapitags.PR_ATTACH_DATA_OBJ, > mapi.IID_IMessage, 0, mapi.MAPI_CREATE) > > After which you have an IMessage for the new item. You can then > probably use the CopyTo() method to copy from the source to the new one. > > HTH, > > Mark _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32