Python To Send Emails Via Outlook Express

Steve Holden steve at
Mon Dec 20 13:47:52 CET 2004

ian at wrote:

> Hi Fredrik,
> Thank you for the suggestion.
> I tried different from/to settings and guess what? The mail came thru.
> The script is now..
> import win32com.client
> s = win32com.client.Dispatch('CDO.Message')
> s.From = "ian at"                                (was
> "ian at")
> s.To = "ian at"                                  (was
> "someone at")
> s.Subject = "The subject"
> s.Send()
> My problem is thought, the message is still not being sent via Outlook
> Express.
> What am I missing?
> Thanks again for your help so far!!
> Kind regards
> Ian
Unfortunately Outlook Express isn't programmable in the same way as 
Outlook. I used to use it because this property gave it a certain degree 
of immunity from macro viruses (back in the days when Outlook came 
configured to open any Office document it came across).

About the next you can do is to add your email address as a Cc and then 
file the messages when you receive them, I suspect.

Why the insistence on using Outlook Express, is you don;t mind me asking?

(who almost always uses smtplib)
Steve Holden     
Python Web Programming
Holden Web LLC      +1 703 861 4237  +1 800 494 3119

More information about the Python-list mailing list