Chris wrote:
Okay, here's the results. The good news is that the code sent the
mail without any popup's. The bad news is that the sent e-mail stays
in the outbox instead of the sent folder. Any suggestions?
Well, only the same one I've already made, which is to look on the
win32all mailing list archives. Since this appears to be beyond you,
here's a note by Chad Stryker commenting on an original work by David
Fraser.
It may give you the clues you need, otherwise Google for the whole
thread(s).
"""Thank you for figuring this extended MAPI interface all out. I
discovered a couple of problems with the code (on my system at least).
First, the message in my outbox was marked as read. Second, the
message would remain in the outbox after it was sent. After several
hours of work, I added three lines to the function that mark the
message as unread and cause the message to be deleted from the outbox
after it is sent.
First, I added a constant that I found in the MAPI header file
MAPIDefS.h.
CLEAR_READ_FLAG = 4
Next I added two lines just before “outboxfolder.SaveChanges(0)”.
message.SetReadFlag(CLEAR_READ_FLAG)
message.SetProps([(mapitags.PR_DELETE_AFTER_SUBMIT,1)])
With these changes, the behavior in the outbox is consistent with
sending messages directly from Outlook.
"""
regards
Steve
Actually, I had already found that message. It still doesn't do what
I'm looking for(namely moving sent messages to the Sent folder).
Chris
Well, in that case please excuse my crotchetiness. It's probably the
time of year.
bah-humbug-ly y'rs - steve
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
Holden Web LLC +1 703 861 4237 +1 800 494 3119
--
http://mail.python.org/mailman/listinfo/python-list