'******************************************************
'*** Send the message Using CDOSYS Win2k & Win2003 ****
'******************************************************
' CDO mail object
myMailServer = sEmailServer
sch = "
http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = Server.CreateObject("CDO.Configuration")
cdoConfig.Fields.Item(sch & "sendusing") = 2
cdoConfig.Fields.Item(sch & "smtpserverport") = iEmailPort
cdoConfig.Fields.Item(sch & "smtpserver") = myMailServer
cdoConfig.fields.update
Set cdoMessage = Server.CreateObject("CDO.Message")
Set cdoMessage.Configuration = cdoConfig
cdoMessage.From = sEmailAddFrom
cdoMessage.To = sConAdHocAddress
cdoMessage.BCC = sConEmailMonitor
cdoMessage.Subject = MakeValid(sSubject)
cdoMessage.TextBody = MakeValid(sBodyText)
If Trim(sUploadFile) <> "" Then
cdoMessage.AddAttachment "file://" & sTempPath & sUploadFile
ClearFilespec sTempPath & sUploadFile
End If
cdoMessage.item("
http://schemas.microsoft.com/cdo/configuration/smtpauthenti
cate").value = 1 ' use clear text authenticate
cdoMessage.item("
http://schemas.microsoft.com/cdo/configuration/sendpassword
").value ="mypassword"
cdoMessage.item("
http://schemas.microsoft.com/cdo/configuration/sendusername
").value ="yourusername"
cdoMessage.Fields.Item("urn:schemas:mailheader:Keywords") = "website"
cdoMessage.Fields.Item("urn:schemas:mailheader:X-Priority") = 1
cdoMessage.Fields.Item("urn:schemas:mailheader:X-MSMail-Priority") =
"High"
cdoMessage.Fields.Item("urn:schemas:mailheader:X-Message-Flag") = "Do
not Forward"
cdoMessage.Fields.Item("urn:schemas:mailheader:Sensitivity") =
"Company-Confidential"
cdoMessage.Fields.Item("urn:schemas:mailheader:Importance") = "High"
cdoMessage.Fields.Update
cdoMessage.Send
Set cdoMessage = Nothing
Set cdoConfig = Nothing