Python and MAPI

Michel Orengo michelorengo at netscape.com
Thu Jan 13 11:05:48 EST 2000


I've just started to play around with MAPI. I'm far from being a expert but here
is a sample of what you can do to send a message:

import win32com.client
session = win32com.client.Dispatch("MAPI.Session")
session.Logon("Michel Orengo")
outbox=session.Outbox
collmsg=outbox.Messages
msgo=collmsg.Add("my subject","my
text",win32com.mapi.mapitags.PR_MESSAGE_CLASS,1)
msgo.Recipients.Add("Michel","morengo at morganlabs.com")
msgo.Sender.Address="morganea at bellatlantic.net"
msgo.Send(1,0)

If I've time, I'll write a more useful example. For now, I'm still playing...
Hope this will help

Michel

"George Thom at s" wrote:

> Hi everyone,
> I'd like to know if anyone has worked with MAPI using Python with the aid of
> either Mark Hammond's win32 extensions or Sam Rushing's calldll/dynwin
> package. Some sample code would also be useful, since there is none in the
> distribution.
> Regards,
> George
> --------------------------------------------------------------------------
> George Thomas
> Resident,Planet Earth,Third Rock from the Sun
> georgethomas at pspl.co.in
>
> Flat No. FI-5, Fifth Floor,
> Himagirinath Co-op. Hsg. Society,
> 486A Elphinstone Road,
> Kirkee, Pune - 411003,
> Maharashtra State,
> India.
> --------------------------------------------------------------------------




More information about the Python-list mailing list