[python-win32] mapisend.py - How does it work?

Gregory Piñero gregpinero at gmail.com
Thu Nov 17 19:23:31 CET 2005


Thanks for all the help guys. It turns out that their exchange server does
act as an SMTP server. So I'll just go that route for now.

-Greg


On 11/15/05, Joshua Kaderlan <jek at zer0.org> wrote:
>
> On 2005-11-16 12:23 +1100, Mark Hammond <mhammond at skippinet.com.au> wrote:
> >
> > > B. I was asked to send emails through my company's exchange server.
> (will
> > > this count?)
> > > Any pointers on how to do this otherwise?
> >
> > If your exchange server is acting as an SMTP server you could just use
> > smptlib. Otherwise you could use "extended MAPI", which is fully
> supported
> > by Python, but somewhat tricky to use. Also, something like:
> >
> > app = Dispatch("Outlook.Application")
> > new_msg = app.CreateItem(0)
> > new_msg.Body = "hello"
> > ...
> > new_msg.Send()
> >
> > may work - I've actually no idea if it does, but something similar
> should :)
> > The trick here would be to find docs for the Outlook object model (eg,
> VB
> > code that uses it). This will obviously depend on Outlook being
> installed.
>
> You can download the Outlook 2003 Visual Basic Application Reference
> (which,
> despite the name, is the Simple MAPI documentation; it uses VB for sample
> code
> though) from MSDN:
> <
> http://www.microsoft.com/downloads/details.aspx?FamilyId=A1CEAD80-23E2-456F-8618-4DA50CC2C38C&displaylang=en
> >
>
> Doing what you suggest above (or something very similar to it) will
> probably
> work, although it'll trigger the Outlook security dialog. If you want to
> get
> around that, either use Extended MAPI or the Outlook Redemption DLL:
> <http://www.dimastr.com/redemption>
> There are also a couple of apps which will allow you to use the regular
> Simple
> MAPI calls and programmatically suppress the dialog.
>
>
> -Josh
> _______________________________________________
> Python-win32 mailing list
> Python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>



--
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com <http://www.blendedtechnologies.com>)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20051117/c968cad3/attachment.htm


More information about the Python-win32 mailing list