Python To Send Emails Via Outlook Express

ian at kirbyfooty.com ian at kirbyfooty.com
Tue Dec 21 03:52:17 EST 2004


Heavy sigh... <grin>

======
This script WILL send the email
import win32com.client


s = win32com.client.Dispatch('CDO.Message')
c = win32com.client.Dispatch('CDO.Configuration')
cdoSourceOutlookExpress = 2
c.Load(cdoSourceOutlookExpress)
s.Configuration = c
s.From = "i... at cgbs.com.au"
s.To = "i... at kirbyfooty.com"
s.Subject = "The subject"


s.Send()
======


======
But if a change the TO email address to a yahoo address the server
rejects it
import win32com.client


s = win32com.client.Dispatch('CDO.Message')
c = win32com.client.Dispatch('CDO.Configuration')
cdoSourceOutlookExpress = 2
c.Load(cdoSourceOutlookExpress)
s.Configuration = c
s.From = "i... at cgbs.com.au"
s.To = "iwcook at yahoo.com"
s.Subject = "The subject"


s.Send()
======

It's official. I have given up sending emails any other way but via
smtp.




More information about the Python-list mailing list