The code below works fine on the Win 2K, however, when I run it on the Win 2008 it gives timeout on the
.CreateMHTMLBod y "http://www.something.c om"
The rest of the classic asp codes work fine on Win 2008, except this one. It there any additional setting that has to be set on IIS that I'm missing?
.CreateMHTMLBod y "http://www.something.c om"
The rest of the classic asp codes work fine on Win 2008, except this one. It there any additional setting that has to be set on IIS that I'm missing?
Code:
<%''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'list of email addresses (separated by coma) is in the strTo
Function SendEmail(strFrom, strSubject, strBody, strTo)
'set email settings
Const cdoSendUsingPort = 2
Const cdoBasic = 1
Dim objConfig ' As CDO.Configuration
Dim objMessage ' As CDO.Message
Dim Fields ' As ADODB.Fields
' Get a handle on the config object and it's fields
Set objConfig = Server.CreateObject("CDO.Configuration")
Set Fields = objConfig.Fields
' Set config fields we care about
With Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "************"
.Item(cdoSMTPServerPort) = 587
.Item(cdoSMTPConnectionTimeout) = 10
.Item(cdoSMTPAuthenticate) = cdoBasic
.Item(cdoSendUserName) = "************"
.Item(cdoSendPassword) = "*******"
.Update
End With
Set objMessage = Server.CreateObject("CDO.Message")
Set objMessage.Configuration = objConfig
With objMessage
.From = strFrom
.Subject = strSubject
'set html or text body of the email
if lcase(left(strBody,4)) = "http" then
.CreateMHTMLBody strBody
else
.TextBody = strBody
end if
EmailList = split(strTo, ",")
for intCount = 0 to uBound(EmailList)
.To = EmailList(intCount)
.Send
next
End With
Set Fields = Nothing
Set objMessage = Nothing
Set objConfig = Nothing
SendEmail = "TRUE"
End Function
%>
Comment