[python-win32] mapi.ATTACH_EMBEDDED_MSG

lduchesne l at urent.org
Wed Jan 6 20:15:39 CET 2010


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)])
[...]

The problem is, I always get a: "TypeError: Unsupported MAPI property type
0xD" when trying to set the PR_ATTACH_DATA_OBJ property. I tried various
ways of creating a new IMessage to embed (the one above and using CDO) but
it seems the property cannot be set.

Using CDO all the way is not an option.. so has anybody succedded in
embeding a message using the extended MAPI interface?

Note that the embedded message will be created from a message/rfc822 source.

Thanks,
Laurent
-- 
View this message in context: http://old.nabble.com/mapi.ATTACH_EMBEDDED_MSG-tp27026941p27026941.html
Sent from the Python - python-win32 mailing list archive at Nabble.com.



More information about the python-win32 mailing list