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