System.Web.Mail.SmtpMail.Send throws Could not access 'CDO.Message' object.

D

DotNetGruven

System.Web.Mail.SmtpMail.SmtpServer = "10.50.7.160";

System.Web.Mail.SmtpMail.Send(mailMessage.From, mailMessage.To,
mailMessage.Subject, mailMessage.Body);


What could cause this exception to be thrown in code behind on an XP Pro
development machine?

- Do I need to install CDONTS? Something else??
- Is there some configuration some where??

TIA,
geo
 
S

Steven Cheng[MSFT]

Hi Geo,

From your description, you encountered "Could not access 'CDO.Message'
object" error when using System.Web.Mail smtp component to send mail?

Based on my experience, such problem is likely caused by the SmtpServer is
not accessable. I Would you have a further check to see whether the
smtpserver you set is avaliable? Also, you can try accessing it via its
server name instead. Or is possible try testing using another smtp server
which is guarantee to work.

In addition, here is a weblink to the System.Web.Mail's FAQ sites which
contains many helpful faqs.
#Frequently Asked Questions for System.Web.Mail
http://www.systemwebmail.com/

Hope also helpful. Thanks.


Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
 
G

Guest

System.Web.Mail.SmtpMail.Send uses CDOSYS not CDONTS so you don't need to install it. You normally get that error if there is a problem with your EmailTo or EmailFrom fields such as

1) Email address is malforme
2) Your smtp server is rejecting the email addresses because of domain security issue

S

1) Make sure your email address is well forme
2) Make sure your smtp server can accept emails from specified domain

Cheers,

Mark.
 
S

Steven Cheng[MSFT]

Hi Geo,

Have you had a chance to check out the suggestions in my last reply or have
you got any further ideas on this issue? If you have anything unclear or if
there're anything else we can help, please feel free to post here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top