Using Simple MAPI with MS Outlook 2007

Lenard Lindstrom len-l at telus.net
Sun Apr 1 17:58:57 EDT 2007


tomer.ha at gmail.com wrote:
> Hi there,
> 
> I'd like to send emails from a Python program using Simple MAPI. I've
> tried this code: http://mail.python.org/pipermail/python-list/2004-December/298066.html
> and it works well with Outlook Express 6 and Thunderbird 1.5, but it
> doens't work at all with Microsoft Outlook 2007. I keep getting this
> message: "WindowsError: MAPI error 2".
> 
> I don't want to use Extended MAPI because it doesn't support
> thunderbird not OE. Therefore, Simple MAPI is the only option for me.
> 
> So, what did I miss here?
> 
> From - Sun

Error code 2 error translates to:

"MAPI_E_FAILURE
One or more unspecified errors occurred. No message was sent. "

, rather vague. I haven't used Simple MAPI with Outlook, but did a quick 
google search. I found that there is a security feature that may effect 
access to Outlook. I have included a few links on the chance that this 
is the cause of the problem.


Outlook Email Security Update:

http://www.slipstick.com/outlook/esecup.htm


Outlook security block & Simple MAPI:

http://help.lockergnome.com/office/Outlook-security-block-Simple-Mapi-ftopict946357.html


Customize programmatic settings in Outlook 2007:

http://technet2.microsoft.com/Office/en-us/library/8a611f92-e197-4dd3-9417-5ed513891af11033.mspx?mfr=true


The google search also uncovered a memory issues with Simple MAPI and 
Outlook:

http://blogs.msdn.com/stephen_griffin/archive/2006/11/03/the-intentional-memory-leak.aspx


Hope this helps,

Lenard Lindstrom



More information about the Python-list mailing list