Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / June 2007

Tip: Looking for answers? Try searching our database.

Getting pretty desperate- Please help -   Using "MailMessage"  and "SmtpMail" on a WinXP Prof box with iis5 and sp2 and dotnet1.1 with the latest service pack

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dorisferrarese@yahoo.com - 20 Jun 2007 22:27 GMT
I am running into the wonderful expection:
"Could not access 'CDO.Message' object."
"Exception has been thrown by the target of an invocation."

You can checkout my code below -
The interesting part with my error is that it only occurs with:
myMessage.BodyFormat = System.Web.Mail.MailFormat.Html;

The email relays perfectly fine with:
myMessage.BodyFormat = System.Web.Mail.MailFormat.Text;

I have spent 1.5 days on this so far ..
~ Doris.

----------------------------------------------------------------------------------------
This is my code:

try
     {
       MailMessage myMessage = new MailMessage();
       myMessage.From = "xxx@yahoo.com";
       myMessage.To = "xxx@yahoo.com";
        SmtpMail.SmtpServer = "";

        myMessage.BodyFormat = System.Web.Mail.MailFormat.Html;
        myMessage.Body = "<html><head></head><body>Hello Andrei</
body></html>";
        //myMessage.BodyFormat = System.Web.Mail.MailFormat.Text;
        //myMessage.Body = "test";

        SmtpMail.Send(myMessage);

     }
     catch(Exception ex)
     {
               throw new Exception(strMessage);
     }
Stuart Davies - 21 Jun 2007 11:49 GMT
Is there anything of any use on here: http://www.systemwebmail.com/faq/4.2.aspx

Signature

Cheers
Stuart
"Is facio in meus apparatus"

> I am running into the wonderful expection:
> "Could not access 'CDO.Message' object."
[quoted text clipped - 33 lines]
>                 throw new Exception(strMessage);
>       }

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.