469,928 Members | 1,796 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,928 developers. It's quick & easy.

Could not access CDO.message

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
4 964
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


''' 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
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
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.

Similar topics

2 posts views Thread by Desmond | last post: by
14 posts views Thread by Gianfranco | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.