How to avoid a warning message box when sending email via Outlook
Dermot Doran
dppdoran at gmail.com
Thu Aug 31 03:22:20 EDT 2006
Hello All,
I'm very new to using win32com! I just want to send an email message via
Outlook. However, I keep getting an annoying message box (generated by
Outlook) indicating that my program could be a virus. Does anybody know how
to get around this? Here is the sample code I'm using:
from win32com.client import Dispatch
s=Dispatch("Outlook.Application")
ns=s.GetNamespace("MAPI")
ns.Logon() # Note: I've taken the login credentials out of the example :-)
mi = ns.Application.CreateItem(0)
mi.Recipients.Add("an,other")
mi.Subject="Hello from Python!"
mi.Body="I just need to figure out how to avoid the message box now!"
mi.Send()
ns.Logoff()
I'm probably missing something silly or have hit a brick wall with what I
want to do with CDO.
Cheers!!
Dermot.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060831/99cbc9ad/attachment.html>
More information about the Python-list
mailing list