Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > BOOK: Beginning Visual C#
|
BOOK: Beginning Visual C#
This is the forum to discuss the Wrox book Beginning Visual C#, Revised Edition of Beginning C# for .NET v1.0 by Karli Watson, David Espinosa, Zach Greenvoss, Jacob Hammer Pedersen, Christian Nagel, Jon D. Reid, Matthew Reynolds, Morgan Skinner, Eric White; ISBN: 9780764543821
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Visual C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 5th, 2004, 10:25 PM
Authorized User
 
Join Date: Jul 2004
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default Could not access 'CDO.Message' object.


Does any one know why I get the error :"Could not access 'CDO.Message' object." and how can I resolve it! The error is raised on the line "SmtpMail.Send(mail);" in the following code....
I suspect it is a security issue or permission issue with my IIS web server.



            try
            {
                MailMessage mail = new MailMessage();
                mail.To = tabManageReviews_txtEmailText.Text;
                mail.From = "[email protected]
                mail.Subject = tabManageReviews_cmboEmail.Text;
                mail.BodyFormat = MailFormat.Html;
                mail.Body = tabManageReviews_txtEmailText.Text;

                SmtpMail.SmtpServer = "smtp.earthlink.net";
                SmtpMail.Send(mail);

                MessageBox.Show("Mail has been sent.", "It's Official",
                    MessageBoxButtons.OK, MessageBoxIcon.Information);

                tabManageReviews_TreeView.SelectedNode =
                    tabManageReviews_TreeView.Nodes[0];
            }

            catch (Exception ex)
            {
                MessageBox.Show("There was an error delivering your mail." +
                    " The specific error message was \n\n:" + ex.Message,
                    "Mail Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

Cmarek
__________________
Cmarek
 
Old September 5th, 2004, 11:32 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

Well once I saw this error bc of SmtpMail.SmtpServer.
r u sure about address?! try using IP!

Always:),
Hovik Melkomian.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Could not access 'CDO.Message' object - ASP.net neeta_gt General .NET 8 December 3rd, 2008 04:41 AM
Source: CDO.Message.1 please help me:) ilknur SQL Server 2000 1 July 23rd, 2006 12:52 PM
'CDO.Message' Object Couldn't be Accessed! shiraz BOOK: ASP.NET Website Programming Problem-Design-Solution 2 December 7th, 2005 11:27 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.