Mail messaging

J

John Sutor

I tried using the following code to send an emial message out but it did
not work. I get the error message
"Could not access CDO.Message object"
Any ideas?

myMessage.To=MessageTo;
myMessage.From=MessageFrom;
myMessage.Subject=Subject;
myMessage.Body=Body;
myMessage.Priority=MailPriority.High;

SmtpMail.SmtpServer=SMTPServer;
try{
SmtpMail.Send(myMessage);
}
 
J

José Joye

I remember having such a problem. Try to look at the inner exception and not
the direct exception. The CDO exception seems to be (at least most of the
time) a generic one that encapsulates the real exception.

Hope this help.
- José
 

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

Top