[python-win32] Manipulating MAPI

Mike Driscoll mdriscoll at co.marshall.ia.us
Mon Jan 28 19:34:35 CET 2008


Hi,

Our organization has been slowly migrating away from closed source
software. As part of this, we recently had to upgrade our mail system and
found that going from Exchange 5 to its newest version was cost
prohibitive. Thus we went with Zimbra, an open source / open standards
alternative. Now we use a web client instead of Outlook (in most cases) to
check out email.

Unfortunately, we discovered that there a number of users who like to be
able to use MS Word to send email. So I wrote a Python script using
wxPython that can send email, including attachments. My problem is getting
the email function in MS Word/Office to send its information to my
program. I've been able to get the mailto functionality from web pages to
work, but not this.

Mozilla Thunderbird works, so there must be some change I need to make in
the registry. Here's what Thunderbird changes:

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.eml]
@="ThunderbirdEML"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{29F458BE-8866-11D5-A3DD-00B0D0
F3BAA7}]
@="Mozilla MAPI"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mailto\DefaultIcon]
@="C:\\Program Files\\Mozilla Thunderbird\\thunderbird.exe,0"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mailto\shell\open\command]
@="\"C:\\Program Files\\Mozilla Thunderbird\\thunderbird.exe\" -osint
-compose \"%1\""


I'm pretty sure it has something to do with the .eml and the mailto
directories, but I'm not sure what to do. I tried changing the paths to
point to my program rather than Thunderbird, but nothing happens when I
try to send an email with Word. I've googled for this off and on for quite
a while (read: months) but haven't found much so I thought that there
might be some experts in this group who could give me a push in the right
direction.

Any hints and/or tips are appreciated. Thanks!

Mike Driscoll
Applications Specialist
MCIS - Technology Center



More information about the python-win32 mailing list