Steve Holden <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] 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 = "[EMAIL PROTECTED]" (was > > "[EMAIL PROTECTED]") > > s.To = "[EMAIL PROTECTED]" (was > > "[EMAIL PROTECTED]") > > 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). > Outlook Express can be accessed through the Simple Mapi interface - at least the version on Win98 can. I have a program that reads and deletes messages from the new mail folder. So I would imaging mail can be also sent through Outlook Express using Simple Mapi, but I have not tried it. I have also not tried using Simple Mapi under Python, only VC++. But a quick test shows I can access MAPI32.DLL use the ctypes package:
import ctypes mapi = ctypes.windll.mapi32 MAPILogon = mapi.MAPILogon ... It is messy though. Lenard Lindstrom <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/listinfo/python-list