PDA

View Full Version : Error in email script


tspek
02-24-2010, 07:20 PM
I don't work in ASP, ever, I know essentially nothing about ASP specifically.

My company has a site that generates money (thus important) and when someone buys something we need to get an email about that order. The company that we paid to build the site years ago is no longer around. I've been searching high and low for some help with this but I'm not having any luck

The code below spits out this error: error '8004020f' and references the red line

Set cdoConfig = CreateObject("CDO.Configuration")

With cdoConfig.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "localhost"
.Update
End With

Set cdoMessage = CreateObject("CDO.Message")

With cdoMessage
Set .Configuration = cdoConfig
.From = "##OUR VALID EMAIL##"
.To = "##MY VALID EMAIL##"
.Subject = "Sample CDO Message"
.TextBody = "This is a test for CDO.message"
.Send
End With

Set cdoMessage = Nothing
Set cdoConfig = Nothing
%>

Old Pedant
02-24-2010, 09:53 PM
http://www.bing.com/search?q=error+8004020f+cdo+message

Several possibilities.

tspek
02-25-2010, 02:09 AM
http://www.bing.com/search?q=error+8004020f+cdo+message

Several possibilities.


I have explored that route...no luck so far.

Old Pedant
02-25-2010, 08:24 PM
Ummm....explored *what* route???? There are about 20 different reasons for that error. Did you check for all of them??

The most likely--if the code used to work and doesn't now--is that the server was upgraded (e.g., from Windows Server 2003 to Windows Server 2008 or similar) and the SMTP settings were changed. Possibly you can no longer use "localhost". But honest, you really do need to check *all* of those possible causes. We can't diagnose it from here with that limited amount of info. You didn't even tell us what error *message* you get; you only told us the message number.

tspek
02-26-2010, 11:23 AM
Ummm....explored *what* route???? There are about 20 different reasons for that error. Did you check for all of them??

The most likely--if the code used to work and doesn't now--is that the server was upgraded (e.g., from Windows Server 2003 to Windows Server 2008 or similar) and the SMTP settings were changed. Possibly you can no longer use "localhost". But honest, you really do need to check *all* of those possible causes. We can't diagnose it from here with that limited amount of info. You didn't even tell us what error *message* you get; you only told us the message number.

1.) I have googled the hell out of this and tried everything I've been able to find.

2.) There is no error message, I posted exactly what the program spits out.

3.) This is a new server but it's also a new addition to the script.

Old Pedant
02-26-2010, 09:07 PM
Dunno what to tell you.

One last question: Can you send email to a person in the same domain as the web server? (That's the situation I'm in right now; same domain is okay, out of domain doesn't work. It's a problem with the SMTP server, so I have no control over it.)

tspek
03-01-2010, 03:31 PM
Dunno what to tell you.

One last question: Can you send email to a person in the same domain as the web server? (That's the situation I'm in right now; same domain is okay, out of domain doesn't work. It's a problem with the SMTP server, so I have no control over it.)

I'll look into that. The next step is to just call the hosting service.

I also thought of just carrying the required variables over to a PHP script that sends the email. Sloppy, but it would work.