invoke user's standard mail client

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Mon May 7 23:14:50 EDT 2007


En Mon, 07 May 2007 18:00:06 -0300, luc.saffre at gmail.com  
<luc.saffre at gmail.com> escribió:

> On May 7, 10:28 am, "Gabriel Genellina" <gagsl-... at yahoo.com.ar>
> wrote:
>>
>> Get the pywin32 package (Python for Windows extensions) from  
>> sourceforge,
>> install it, and look into the win32comext\mapi\demos directory.
>
> Thanks for the hint, Gabriel.
> Wow, that's heavily spiced code! When I invoke mapisend.py I get:
>
>   Traceback (most recent call last):
>     File "mapisend1.py", line 85, in <module>
>       SendEMAPIMail(SendSubject, SendMessage, SendTo,
> MAPIProfile=MAPIProfile)
>     File "mapisend1.py", line 23, in SendEMAPIMail
>       mapi.MAPIInitialize(None)
>   pywintypes.com_error: (-2147467259, 'Unspecified error', None, None)
>
> But what is a MAPI profile? I left this variable blank.

You can register several profiles (or users, or accounts); leave it blank  
to use the default profile.

> Do I need MS
> Exchange Server to run this demo?

No. But this simple example used to work fine for me, but not anymore :( .  
Perhaps it has to do with my Eudora configuration. I've never used Outlook  
nor OutlookExpress btw.
You may find this thread interesting:  
http://mail.python.org/pipermail/python-win32/2005-November/003985.html

-- 
Gabriel Genellina




More information about the Python-list mailing list