Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
With objCDOMail
.From = strFrom
.To = strUser& " <" & strEmail & ">"
.Subject = strSubject
.Body = strBody
.Send
End With
Set objCDOMail = Nothing
ส่วน xp
Dim objCDOSYSCon
Set objCDOSYSMail = Server.CreateObject("CDO.Message")
Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
With objCDOSYSCon
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strMail_server
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
.Fields.Update
End With