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:

CODE:

   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( "http://schemas.microsoft.com/cdo/configuration/sendusing") = 1 'tells cdo we're using the local smtp service
   Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "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 = " someone@somedomain.com " 'could also be " webmaster@domain.com "
   iMsg.From = " myemail@mydomain.com " 'must be " someone@domain.com "
   iMsg.Subject = "Test subject"
   iMsg.HTMLBody = "Some email text"
   iMsg.Send 'commands CDO to send the message

Customer Care Number: 920015999