How can I write a script to send an e-mail from a form web page under Windows 2003 Hosting ?

 A. Our Windows hosting is built with Windows 2003 and above. Therefore, the older CDONTS component is not available anymore as it was found to be insecure. The new component is called CDO and there are many code samples on the Internet to see how you can use it. Below is a code sample tested with out hosting system which any Windows Hosting customer can use:


   Dim iMsg
   Set iMsg = CreateObject("CDO.Message") 'calls CDO message COM object
   Dim iConf
   Set iConf = CreateObject("CDO.Configuration") 'calls CDO configuration COM object
   Dim Flds
   Set Flds = iConf.Fields
   Flds( "") = 1 'tells cdo we're using the local smtp service
   Flds("") = "c:\inetpub\mailroot\pickup" 'verify that this path is correct
   Flds.Update 'updates CDO's configuration database
   Set iMsg.Configuration = iConf 'sets the configuration for the message
   iMsg.To = " " 'could also be " "
   iMsg.From = " " 'must be " "
   iMsg.Subject = "Test subject"
   iMsg.HTMLBody = "Some email text"
   iMsg.Send 'commands CDO to send the message

Customer Care Number: 920015999