I use the following code for using CDOSYS. Remember that it wont work with NT.. This code def works, the only thing u need to do is change the IP mail address.
Set cdoMail = Server.CreateObject("CDO.Message")
Set cdoCON = Server.CreateObject ("CDO.Configuration")
'------------ localhost to the IP address. --------
cdoCON.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
cdoCON.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
cdoCON.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
cdoCON.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
cdoCON.Fields.Update
Set cdoMail.Configuration = cdoCON
cdoMail.From = "someone@somwhere"
cdoMail.To = "someone@somwhere"
cdoMail.Subject = "title"
cdoMail.HTMLBody = "hello do u work dale"
cdoMail.Send
Set cdoMail = Nothing
Set cdoCON = Nothing
DJWright
|