Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
| Search | Today's Posts | Mark Forums Read
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET 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 March 21st, 2005, 01:29 PM
Registered User
 
Join Date: Jan 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Could not access 'CDO.Message' object - ASP.net

Hi All,

My web application is sending emails using CDO object.

SMTP service is enabled and running on my web server.

I am Directly setting the SMTP address to our mail server IP address. It is sending mails to internal users but giving "Could not access 'CDO.Message' object" error when sending a mail to outside address such as Yahoo, Hotmail or Gmail etc.

Is there any setting need to be done on either IIS or Exchange mail server to send mails to outside world ?

Do I need to enable the SMTP virtual site on the web server ?

Help !!!

Neeta
 
Old March 22nd, 2005, 04:10 AM
Authorized User
 
Join Date: Jul 2004
Location: chennai, tamilnadu, India.
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to aravwind Send a message via Yahoo to aravwind
Default

chk whether you imported
Imports System.Web.Mail
 
Old March 22nd, 2005, 07:58 AM
Registered User
 
Join Date: Jan 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Import statement is there ...

it is sending mails within organization but failing when tryin to send mails to outside world ... like yahoo or hotmail address

thanks
 
Old March 22nd, 2005, 10:00 AM
Authorized User
 
Join Date: Jul 2004
Location: chennai, tamilnadu, India.
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to aravwind Send a message via Yahoo to aravwind
Default

ofcourse you need to enable the smtp virtual server in the web server.

also, can you post the error message u get.
 
Old March 22nd, 2005, 10:11 AM
Registered User
 
Join Date: Jan 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

SMTP service is running on the web server, but is there any other setting need to do to point this SMTP service to our exchange server.

it is giving "CDO.message fail" error.

I don't know why it is not sending mails to outside world and sending only within organization ...


 
Old March 23rd, 2005, 07:36 AM
Friend of Wrox
 
Join Date: Jul 2004
Location: , , India.
Posts: 345
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to gokul_blr Send a message via Yahoo to gokul_blr
Default

It should be related with AV.

Ref :
"I tracked this issue down to McAfee VirusScan Enterprise 8.0 VirusScan Console, Access Protection, Properties, Port-Blocking tab, Rule:"Prevent mass mailing worms from sending mail" This blocks outbound access to any port 25 on the network. Edit button shows a list of excluded processes to which new processes can be added."

Gokulan Ethiraj
 
Old March 24th, 2005, 08:03 AM
Authorized User
 
Join Date: Feb 2005
Location: Kolkata, West Bengal, India.
Posts: 14
Thanks: 0
Thanked 1 Time in 1 Post
Default

hi there, try this i have successfully done this,
first create four textboxes in a webform whose id s are like this
1.txtFrom
2.txtTo
3.txtSub
4.txtContent
now drag a button from toolbox to send mail
now try the following code

private void Button1_Click(object sender, System.EventArgs e)
        {
            SmtpMail.SmtpServer="localhost";
            mmsg=new MailMessage ();
            mmsg.From =txtFrom.Text ;
            mmsg.To =txtTo.Text;
            mmsg.Subject =txtSub.Text;
            mmsg.Body =txtContent.Text;
            mmsg.BodyFormat =MailFormat.Html;
            mmsg.Priority =MailPriority.High ;
            SmtpMail.Send(mmsg);

        }

Don't forget to include the namespace using System.Web.Mail;
also at the begining declare,after the start of the class
protected MailMessage mmsg;
i think SmtpMail.SmtpServer is something elseRegards

somissac

somissac
 
Old March 14th, 2006, 05:32 PM
Registered User
 
Join Date: Mar 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello,

I am facing same problem with the CDO Object.

I can send emails internally but get the error "Could not access 'CDO.Message' object" when sending a mail to outside address such as Yahoo, Hotmail or Gmail etc.

Has anyboy got the solution to this?

Thanks
-M
 
Old December 3rd, 2008, 04:41 AM
Registered User
 
Join Date: Dec 2008
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can go to this site to download a program which you can try to send an email. If there is an error if will give you a better error message then a general one. It also provide other solution which may help you too.

connectionstringexamples.com/article.php?story=200812030012544




Similar Threads
Thread Thread Starter Forum Replies Last Post
'CDO.Message' Object Couldn't be Accessed! shiraz BOOK: ASP.NET Website Programming Problem-Design-Solution 2 December 7th, 2005 11:27 AM
ASP CDO.Message difficulty crmpicco Classic ASP Basics 0 March 1st, 2005 07:48 AM





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