'************************************************* *****
'*** 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:Key words") = "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:Sen sitivity") =
"Company-Confidential"
cdoMessage.Fields.Item("urn:schemas:mailheader:Imp ortance") = "High"
cdoMessage.Fields.Update
cdoMessage.Send
Set cdoMessage = Nothing
Set cdoConfig = Nothing
"michaaal" <re******@verizon.net> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
I have had success using ASP to send out mail, however, how can I make it
send mail using an external SMTP server that requires authentication?
Thanks!