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()
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.
-- http://mail.python.org/mailman/listinfo/python-list