PDA

View Full Version : Could not access 'CDO.Message' object


bruce
02-12-2004, 02:16 AM
What exactly is the error?


quote:Originally posted by SStory

I am getting this message from my asp.net app.

I can't understand why? It seems to work when the page is called from some pages but not others.

The pages call a page that has the following mailing code in it...

[quote]
Try
DimmessageAsNewMailMessage()
message.To=
ConfigurationSettings.AppSettings("RecipientEmailAddress")
message.From=strMsgFrom
message.BodyFormat=MailFormat.Html
message.Body=strCallingPageHTML
message.Subject=strMsgSubject

SmtpMail.SmtpServer="localhost"
SmtpMail.Send(message)
CatchexAsException
Response.Write("I'msorry,butthereseemstohavebeenaproblem
inemailingyourreport.</br></br>Theerrormessagewas:"&ex.Message)
Response.End()
ExitSub
EndTry
</CODE>

Why would this work when called from some pages and from others give me a CDO error. I never use CDO directly. I am using the .NET class.

I am clueless as to what to do.

[b]Thanks,

Shane

Shane Story
</blockquote id="quote"></font id="quote">

busyweb
02-12-2004, 07:30 AM
In my opinion??
mostly got CDO error because of smtp server connection failure.
try to find what your smtp delivery/connection properties are???
some page might be from your local machine pages??
other pages might be from your network page (pure guess)

I got similar problem befor ^^

I hope it solves.

SStory
02-12-2004, 08:03 AM
I am getting this message from my asp.net app.

I can't understand why? It seems to work when the page is called from some pages but not others.

The pages call a page that has the following mailing code in it...

[quote]
Try
DimmessageAsNewMailMessage()
message.To=
ConfigurationSettings.AppSettings("RecipientEmailAddress")
message.From=strMsgFrom
message.BodyFormat=MailFormat.Html
message.Body=strCallingPageHTML
message.Subject=strMsgSubject

SmtpMail.SmtpServer="localhost"
SmtpMail.Send(message)
CatchexAsException
Response.Write("I'msorry,butthereseemstohavebeenaproblem
inemailingyourreport.</br></br>Theerrormessagewas:"&ex.Message)
Response.End()
ExitSub
EndTry
</CODE>

Why would this work when called from some pages and from others give me a CDO error. I never use CDO directly. I am using the .NET class.

I am clueless as to what to do.

Thanks,

Shane

Shane Story