...

View Full Version : CDO message failure (with no error message)



divide
04-02-2007, 11:23 AM
Hi. I have a pretty standard bit of script that generates a cdo email and sends it off to a predefined address list. The only bit of the script that is of note is that the attachment is an xmlss spreadsheet generated by a seperate asp page and added to the email by specifying the url of the asp page in the addattachment line of the cdo.message

This has been working fine for a fair few months now, but recently we changed web servers, and now it no longer works. When I attempt to run the page, internet explorer spends a couple of minutes attempting to load it (which is intself odd as I'd expect it to timeout after 30 seconds), then states that the maximum time for loading a page has expired, but gives no other error message. There are a couple of email addresses in the send-to list, one of them has been receiving the email (?!?) but the rest haven't (and the one that's been receiving it is not the 1st in the list). If I change the email address so it sends only to me, I receive nothing.

I guess theres something different on this new web server, but I don't know what. Any help would be much appreciated!

dim mymail
dim body
body = "some html bla..."
Set myMail=CreateObject("CDO.Message")
myMail.Subject="AM Service Report - "& useDate
myMail.From="me@somehwere.co.uk"
myMail.To= "somebody@somehwere.co.uk;someoneelse@somewhere.co.uk"
myMail.HTMLBody=body
myMail.AddAttachment "http://www.somewhere.co.uk/results.asp?useDate="& useDate
myMail.Send
set myMail=nothing

Roelf
04-02-2007, 12:12 PM
first you should turn off friendly error messages in your browser. Then you might see more information about what is going wrong.

At this moment, the only thing that i can think of is that the CDO component is not installed at the server or smtp is not configured

divide
04-02-2007, 12:33 PM
first you should turn off friendly error messages in your browser. Then you might see more information about what is going wrong.

At this moment, the only thing that i can think of is that the CDO component is not installed at the server or smtp is not configured

thats part of the problem, friendly error messages are turned off! The exact error message is this:

Active Server Pages error 'ASP 0113'

Script timed out

/reports/FDR/New_FDR_Report/emailerTEST.asp

The maximum amount of time for a script to execute was exceeded. You can change this limit by specifying a new value for the property Server.ScriptTimeout or by changing the value in the IIS administration tools.

So I'm getting a script timeout message rather than some specific cdo error, hence not having a clue what's actually failing

There is no problem with the output of the URL that it's trying to add as an attachment, but I think the problem is to do with it trying to add an attachment (other pages in our site that use CDO but dont add an attachment seem to work ok still)

degsy
04-18-2007, 04:20 PM
AFAIK if you want to send an attachment then it needs to be a local file.

if you want to send a remote webpage then use CreateMHTMLBody



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum