hi all,
i'm not sure this problem of mine related to this section or not, but I just go ahead and try anyway just incase.
I have a project to upgrade a shopping cart mailing function from CDONT to CDOSYS. I copied and modified to accomodate with the existing code, and this is what I got:
<%
Function CDOSYS(fromName, fromEmail, toEmail, subject, body, contType)
dim mail,conf,flds,I
Set mail = Server.CreateObject("CDO.Message")
Set conf = Server.CreateObject("CDO.Configuration")
Set flds = conf.Fields
'Configure the server
flds(" = pSmtpServer
flds(" = 25
flds(" = 2
flds(" = 60
flds.Update
mail.Configuration = conf
'Message
mail.From = fromName & " <" & fromEmail & ">"
mail.Subject = subject
if contType = 1 then 'Send HTML Email
mail.HTMLBody = body
else
mail.TextBody = body
end if
if isArray(toEmail) then 'Send Multiple Emails
for I = 0 to Ubound(toEmail)
if len(toEmail(I)) > 0 then
mail.To = toEmail(I)
mail.Send
end if
next
else 'Send Single Email
mail.To = toEmail
mail.Send
end if
'Clean up
set mail = nothing
set flds = nothing
set conf = nothing
end Function
%>
However, I got this message:
"The page cannot be displayed", and no particular error is suggested, so I'm stuck.
I tracked the code to where the problem has begun, and knowing for sure it is somewhere between this CDOSYS codes.
Could someone help me to see where the ERROR actually located, and if possible, help me to correct it.
Thank alot!
i'm not sure this problem of mine related to this section or not, but I just go ahead and try anyway just incase.
I have a project to upgrade a shopping cart mailing function from CDONT to CDOSYS. I copied and modified to accomodate with the existing code, and this is what I got:
<%
Function CDOSYS(fromName, fromEmail, toEmail, subject, body, contType)
dim mail,conf,flds,I
Set mail = Server.CreateObject("CDO.Message")
Set conf = Server.CreateObject("CDO.Configuration")
Set flds = conf.Fields
'Configure the server
flds(" = pSmtpServer
flds(" = 25
flds(" = 2
flds(" = 60
flds.Update
mail.Configuration = conf
'Message
mail.From = fromName & " <" & fromEmail & ">"
mail.Subject = subject
if contType = 1 then 'Send HTML Email
mail.HTMLBody = body
else
mail.TextBody = body
end if
if isArray(toEmail) then 'Send Multiple Emails
for I = 0 to Ubound(toEmail)
if len(toEmail(I)) > 0 then
mail.To = toEmail(I)
mail.Send
end if
next
else 'Send Single Email
mail.To = toEmail
mail.Send
end if
'Clean up
set mail = nothing
set flds = nothing
set conf = nothing
end Function
%>
However, I got this message:
"The page cannot be displayed", and no particular error is suggested, so I'm stuck.
I tracked the code to where the problem has begun, and knowing for sure it is somewhere between this CDOSYS codes.
Could someone help me to see where the ERROR actually located, and if possible, help me to correct it.
Thank alot!