[python-win32] MAPI CopyMessages

Tim Golden mail at timgolden.me.uk
Mon Jun 8 15:04:59 CEST 2009


Has anyone had success using the PyIMAPIFolder CopyMessages method?
The spambayes source looks as tho' it's using it happily, so I can't
imagine there's any fundamental problem. Only... it doesn't work for
me. :(

I have a reproducible test case attached which is -- in the way of the
extended MAPI code -- a bit wordy. But I believe it is self-contained
and could be run by anyone with an Exchange account and a folder called
"Docs". The code is also on pastebin: http://pastebin.com/m575adec6

In short, I find my Inbox and my Docs folder and attempt to copy an
arbitrary message from the one to the other. The code completes without
error, but nothing seems to be happening. There's nothing to suggest
that any "commit"-type action is necessary. Just in case, I've tried
various combinations of SaveChanges to no avail. I look in the Docs
folder on Outlook and nothing's there.

All suggestions gratefully received.

TJG
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: copy-messages.py
URL: <http://mail.python.org/pipermail/python-win32/attachments/20090608/7e67eb1c/attachment.asc>


More information about the python-win32 mailing list