473,320 Members | 1,612 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Could not access CDO message

Hi,
I wrote coding to send email with the following format.


eMail = new MailMessage();
eMail.BodyFormat = MailFormat.Text;
eMail.From = _SendFrom;
eMail.Fields[http://schemas.microsoft.com/cdo/con...on/smtsperver] = "SMTPServerName";
eMail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpserverport"] = 25;
eMail.Fields["http://schemas.microsoft.com/cdo/configuration/sendusing"] = 2;
eMail.To = "recipients";
SmtpMail.SmtpServer = SMTPServerName;
SmtpMail.Send(eMail);

Eventhough smtp server is enable i am getting error message as "Could not access CDO message".
i tried a lot in net search but i not.
so help me how to overcome this error
Apr 9 '07 #1
1 918
gomzi
304 100+
Hi,
I wrote coding to send email with the following format.


eMail = new MailMessage();
eMail.BodyFormat = MailFormat.Text;
eMail.From = _SendFrom;
eMail.Fields[http://schemas.microsoft.com/cdo/con...on/smtsperver] = "SMTPServerName";
eMail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpserverport"] = 25;
eMail.Fields["http://schemas.microsoft.com/cdo/configuration/sendusing"] = 2;
eMail.To = "recipients";
SmtpMail.SmtpServer = SMTPServerName;
SmtpMail.Send(eMail);

Eventhough smtp server is enable i am getting error message as "Could not access CDO message".
i tried a lot in net search but i not.
so help me how to overcome this error

No idea as to where you are going wrong. but, whenever i need to send a mail what is do is this.
declare the mailmessage, add the subject, body, to and from addresses in the code behind, and specify the smtp server name,port no, username and password in the web.config

i.e. in web.config
<system.net>
<mailsettings>
<smtp>
<network server,port,username,password>
</..>
...
Apr 9 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Tim Eliot | last post by:
Just wondering if anyone has hit the following issue and how you might have sorted it out. I am using the command: DoCmd.TransferText acExportMerge, , stDataSource, stFileName, True after...
2
by: Desmond | last post by:
Hi, I would really appreciate if somebody could give some advise on this. I've a ASP.NET application that is supposed to send emails and it is tested to be working well on IIS 5.0 and tested...
4
by: Lynn | last post by:
hi, anyone knows how to fix this error? Event Type: Error Event Source: ASP.NET 1.0.3705.288 Event Category: None Event ID: 1082 Date: 1/18/2004 Time: 12:50:47 AM User: N/A
1
by: Jens Øster | last post by:
Hi I am writing a ASP.NET web application that must sent some e-mails. I get the exception “Could not access 'CDO.Message' object” when I call SmtpMail.Send. This only happens when I send...
3
by: Jens | last post by:
Hi I am writing a ASP.NET web application that must sent some e-mails. I get the exception “Could not access 'CDO.Message' object” when I call SmtpMail.Send. This only happens when I send...
4
by: Liz Patton | last post by:
Here's the exception: System.Exception: Unable to send mail: Could not access 'CDO.Message' object. ---> System.Web.HttpException: Could not access 'CDO.Message' object. --->...
2
by: Martin | last post by:
Hi, I have standard code that sends mail from an asp.net application. The application is running on a production web server. it uses the standard system.web.mail namespace. most of the time...
14
by: Gianfranco | last post by:
Hi everybody, First of all, sorry for my english if it isn't perfect ;-p I have an error in an asp.net application. I have win2003 server, with iis 6. I'm developping with visual studio...
8
by: hufaunder | last post by:
I have a website that consumes a webservice. Both of them are in the Default Website folder. I can execute the service without any problem when I go to the test page http://localhost/Service.asmx....
11
by: fniles | last post by:
One of our application uses VB6 and Access97 database. Another application uses VB.NET 2005. This morning for about 15 seconds when the application tries to read either a query or a table from the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, youll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shllpp 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.