Problems with CDOSys and Win2K

R

Rico

Hello,

I have a Win2K server that I run a website on. I have an asp page that
sends an email to me when someone makes a request or provides feedback on
the website. It has worked fine until some point in the last month. I know
there were a bunch of "Critical Updates" that Microsoft forced on my machine
and forced the restart. Could that have anything to do with the reason the
email doesn't work anymore? I keep getting a "Page cannot be displayed"
error when I post to the asp page that sends the email. I also have another
third party ASP.net application that doesn't send email anymore, so that's
why I wondered if it was the component. Below is the function that I'm
using to send the email.

Any help would be greatly appreciated.

Thanks!


if mailComp = "CDOSYS" then
set cdoMessage = Server.CreateObject("CDO.Message")
set cdoConfig = Server.CreateObject("CDO.Configuration")
'
cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing")
= 2
'
cdoConfig.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver"
) = smtpServer
cdoConfig.Fields.Update
set cdoMessage.Configuration = cdoConfig
cdoMessage.From = fromAddr
cdoMessage.ReplyTo = replyTo
cdoMessage.To = recipients
cdoMessage.Subject = subject
cdoMessage.HtmlBody = body
on error resume next
cdoMessage.Send
if Err.Number <> 0 then
SendMail = "Email send failed: " & Err.Description & "."
end if
set cdoMessage = Nothing
set cdoConfig = Nothing
exit function
end if

'Send email (JMail version).

if mailComp = "JMail" then
set mailObj = Server.CreateObject("JMail.SMTPMail")
mailObj.Silent = true
mailObj.ServerAddress = smtpServer
mailObj.Sender = fromAddr
mailObj.ReplyTo = replyTo
mailObj.Subject = subject
addrList = Split(recipients, ",")
for each addr in addrList
mailObj.AddRecipient Trim(addr)
next
mailObj.ContentType = "text/html"
mailObj.Body = body
if not mailObj.Execute then
SendMail = "Email send failed: " & mailObj.ErrorMessage & "."
end if
exit function
end if
 
D

Dave Anderson

Rico said:
I have a Win2K server that I run a website on. I have an asp page
that sends an email to me when someone makes a request or provides
feedback on the website. It has worked fine until some point in the
last month. I know there were a bunch of "Critical Updates" that
Microsoft forced on my machine and forced the restart. Could that
have anything to do with the reason the email doesn't work anymore?
I keep getting a "Page cannot be displayed" error when I post to the
asp page that sends the email.

Start here for viewing better error messages:
http://www.aspfaq.com/show.asp?id=2109


I also have another third party ASP.net application that doesn't
send email anymore, so that's why I wondered if it was the
component. Below is the function that I'm using to send the email.

Once you get more descriptive error messages, the problem may reveal itself.
Among the many possibilites include SMTP services being turned off, lacking
the disk space to drop messages into the pickup folder (if using local
services) and changes on your relay or smart host servers (if you use
those).

Also, I note that you do not perform an update on cdoConfig.Fields:

cdoConfig.Fields(
"http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

cdoConfig.Fields(
"http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtpServer

cdoConfig.Fields.Update()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top