System.Web.Mail problems

D

David Cho

My code below gives me an error message that says "Error loading type
library/DLL error"

I've looked around and some postings state that my ISP needs to have "CDO
service" running. Why isn't just using a STMP server enough? And there
seem to be some third party controls that I need to buy in order to have my
ASP.NET page send emails.

Could somebody post a simple solution that does not involve a third party
product? If this "CDO service" is the only option, could you post a simple
tutorial on how to set that up?

My development enviroment is XP, but the production server is 2000.

//my code below

MailMessage msg = new MailMessage();

msg.To = "(e-mail address removed)";

msg.Subject = "test";

SmtpMail.SmtpServer = "smtp-server.socal.rr.com";

SmtpMail.Send(msg);
 
D

David Cho

Just one more thing. With a UNIX server and SENDMAIL, I didn't have to deal
with any of these problems. Why is it so complicated in .NET? Sorry. Just
had to get this off my chest.
 
B

Brian Henry

it's not so complicated... it's just something is not installed correctly...
are you using a local server or a remotely hosted server? if remotely hosted
talk to your hosting company about it.
 
M

Mark Fitzpatrick

The Smtp.mail object is kind of a wrapper for the code that does the actual
talking to the SMTP server. Without some mechanism to talk to the SMTP
server correctly you can't send email. If the Collaboration Data Objects
(CDO) aren't installed on the server then there are still alternatives (free
ones too). If your host doesn't have CDO installed find out if they have
another object instead. It could be your host has disabled CDO, but has
installed a better component that you can use. I ran a quick query at
411asp.net and found some free .net components for sending mail. Check out
http://www.411asp.net/func/search?qry=smtp&cat=pr

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
 
D

David Cho

Brian,

My hosting company says they simply registered the dll (cdosys.dll in this
case), but I still run into the same error.

Is there more to it then registering the dll on the same server that runs
Exchange?
 
W

William LaMartin

I missed the first part of this, but I think Microsoft CDO for Exchange uses
the dll CDOEX.dll, which will supercede CDOSYS.dll on any systems on which
the former is installed.
 

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,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top