By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,534 Members | 865 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,534 IT Pros & Developers. It's quick & easy.

Could not access CDO.message

P: n/a
Hi

i have one Email application.When run that application,i
got an error,
"Could not access 'CDO.Message' object."
i have also configure the SMTP,means right click on the
default SMTP server then select the Access tab,after then
choose the Relay button,in that i gave the IP address of
SMTP server and click on ok
then also it will gives the same error
i have reference of cdosys.dll also

can any one help me?
mamatha

Nov 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Mamaths,

I will not say I can help you however for this problems you have to show
some piece of code. (This can be done in thousand ways)

Cor

i have one Email application.When run that application,i
got an error,
"Could not access 'CDO.Message' object."
i have also configure the SMTP,means right click on the
default SMTP server then select the Access tab,after then
choose the Relay button,in that i gave the IP address of
SMTP server and click on ok
then also it will gives the same error
i have reference of cdosys.dll also

can any one help me?
mamatha

Nov 20 '05 #2

P: n/a


''' set the from address
aMailMessage.From = "km***********@yahoo.co.in"
''' set the to address and subject
aMailMessage.To = "ma***********@yahoo.com"
aMailMessage.Subject = "This is a test email message."

''' send in Text format
aMailMessage.BodyFormat = System.Web.Mail.MailFormat.Text

''' set the body text (Remember you need to keep your paragraphs
to under 1000 characters)
aMailMessage.Body = "This is the text of the email message."

''' add an attachment if you want to
'aMailMessage.Attachments.Add(New
System.Web.Mail.MailAttachment("C:Test.txt",
System.Web.Mail.MailEncoding.Base64))

''' send the email
' System.Web.Mail.SmtpMail.SmtpServer = "203.124.220.78"

System.Web.Mail.SmtpMail.SmtpServer = "209.25.134.124"
System.Web.Mail.SmtpMail.Send(aMailMessage)
MsgBox("Message has sent")

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #3

P: n/a
Mamatha,

I see no problems in the code you sand. Are you sure this 209.25.134.124 is
an SMTP server?

Otherwise try to paste the mailserver from your Outlook in it.
And when it is an Exchange server maybe you can take as well attention to
this

http://msdn.microsoft.com/library/de...vr_cdo_top.asp

Cor
Nov 20 '05 #4

P: n/a
This can be a tough one to debug. The problem is that this error message
gets thrown for a so many reasons that it's almost useless. For example, if
you try to send an email to an email address that has invalid chars like
myemail!@.'aol.com you will get this error message.

I have found that a more helpful error message is sometimes buried two
levels down in the exception object. Once you have caught the exception,
try looking here: myException.InnerException.InnerException.Message. This
may contain a useful message that will point you towards the actual problem.

Hope this helps,

Kevin

"Arne" <Ar**@discussions.microsoft.com> wrote in message
news:F3**********************************@microsof t.com...
I am having the same problem and Cor Ligthert doesn't help

"mamatha" wrote:
Hi

i have one Email application.When run that application,i
got an error,
"Could not access 'CDO.Message' object."
i have also configure the SMTP,means right click on the
default SMTP server then select the Access tab,after then
choose the Relay button,in that i gave the IP address of
SMTP server and click on ok
then also it will gives the same error
i have reference of cdosys.dll also

can any one help me?
mamatha

Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.