simple-mapi, python, and outlook express

M

Mark Hahn

I want to add a feature to my about-to-be-released Python windows app that
allows me to send email with attachments. I was hoping to use MAPI so that
my user doesn't have to deal with setting the mail server, proxy settings,
return mail address, etc. and could use their existing addr book (this app
is for dummies). I first tried out CDO only to find out that recent outlook
installations haven't been installing that. Then I went to the trouble to
get a pure MAPI send to work (if anyone wants that as an example, let me
know) only to find out that Outlook express doesn't support MAPI, it only
supports simple-MAPI. Now I just found out that Python's win32all doesn't
support simple-MAPI.

AARRGGHH I really really hate windows (I feel better now).

Unless anyone can correct any of my assumptions above, or suggest any new
way to do this, I guess I'll just give up and put in the complete python
mail client and forget using their default mail client.
 
S

Syver Enstad

Mark Hahn said:
I was hoping to use MAPI so that my user doesn't have to deal with
setting the mail server, proxy settings, return mail address,
etc. and could use their existing addr book (this app
is for dummies).
Now I just found out that Python's win32all
doesn't support simple-MAPI.

Hi Mark, I suggest you try out ctypes which is a module that makes it
very straight forward to call C functions from Python. If I remember
correctly you just need to call a single function, MapiSendMail to do
what you want to do, so it should not be too difficult.

If you have already written a Simple Mapi client in C you could expose
it as a python C extension. There are several good tutorials on
writing C extensions on the net and the Python C-api is quite nice
when you get used to it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,526
Members
44,997
Latest member
mileyka

Latest Threads

Top