473,324 Members | 2,501 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,324 software developers and data experts.

Could not access 'CDO.Message' object Error

But i get Error:-
Could not access 'CDO.Message' object Error

I'm trying to send email using this :-

Dim objEmail as New MailMessage
sBody = "This is our test email to you"
objEmail.Subject="This is my Subject"
Dim MySQL as string = "Select Name, email from TestMail"
Dim MyConn As SqlConnection = New
SqlConnection(ConfigurationSettings.AppSettings("C onfigSettings"))
Dim objDR as SQLDataReader
Dim Cmd as New SQLCommand(MySQL, MyConn)
MyConn.Open()
objDR=Cmd.ExecuteReader(system.data.CommandBehavio r.CloseConnection)

While objDR.Read()
sEmail = objDR("email")
objEmail.To =sEmail
objEmail.FROM="fr*****@MyDomain.com"
objEmail.Body=sBody & vbcrlf & "Name: " & objDR("Name") & vbcrlf &
"Email: " & sEmail
objEmail.BodyFormat = MailFormat.Text
SmtpMail.SmtpServer ="mail.MyDomain.com"
SmtpMail.Send(objEmail)
lblEmails.text+=sEmail & "<br>"
End While
MyConn.Close

System.Web.HttpException: Could not access 'CDO.Message' object

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #1
2 1411
Hi!

Please refer http://www.systemwebmail.com/faq/4.2.3.aspx
Regards,
Sin Min

"Patrick Olurotimi Ige" wrote:
But i get Error:-
Could not access 'CDO.Message' object Error

I'm trying to send email using this :-

Dim objEmail as New MailMessage
sBody = "This is our test email to you"
objEmail.Subject="This is my Subject"
Dim MySQL as string = "Select Name, email from TestMail"
Dim MyConn As SqlConnection = New
SqlConnection(ConfigurationSettings.AppSettings("C onfigSettings"))
Dim objDR as SQLDataReader
Dim Cmd as New SQLCommand(MySQL, MyConn)
MyConn.Open()
objDR=Cmd.ExecuteReader(system.data.CommandBehavio r.CloseConnection)

While objDR.Read()
sEmail = objDR("email")
objEmail.To =sEmail
objEmail.FROM="fr*****@MyDomain.com"
objEmail.Body=sBody & vbcrlf & "Name: " & objDR("Name") & vbcrlf &
"Email: " & sEmail
objEmail.BodyFormat = MailFormat.Text
SmtpMail.SmtpServer ="mail.MyDomain.com"
SmtpMail.Send(objEmail)
lblEmails.text+=sEmail & "<br>"
End While
MyConn.Close

System.Web.HttpException: Could not access 'CDO.Message' object

*** Sent via Developersdex http://www.developersdex.com ***

Nov 19 '05 #2
Fixed it..
I looked through that page already and thre is alot of info there.
Thanks Sin Min

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Thys Brits | last post by:
Hi, I'm using the System.Web.Mail class to send an e-mail from my ASP.Net application, but when sending the e-mail, I'm getting the above error. It seems to be because I have Office XP...
2
by: Janna Deegan | last post by:
Hello all, First off, if there is a better place to post for an answer to this question, please feel free to point me there. I have some very strange behavior happening with my System.web.mail...
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...
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...
1
by: Michael | last post by:
Hello, I've read a lot of threads on this subject, but they typically go back to a problem with the smtp server configuration. In my case, everything works great until I uncomment the one line...
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. --->...
3
by: pmud | last post by:
Hi, I have ab ASP.Net Application in which I need to send e-mail on button click. Even though my C# code for that is correct.I am getting the following error:: I think the following error can be...
5
by: lds | last post by:
I am getting the following error: The "SendUsing" configuration value is invalid. Description: An unhandled exception occurred during the execution of the current web request. Please review the...
3
by: Anthony Fine | last post by:
Hello All, I have a VB.Net app that needs to send mail. I have created a class for building my e-mail, but keep getting the error (Could not access 'CDO.Message' object.) when trying to send...
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...
0
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...
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: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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: 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
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.