system.web.mail.StmpMail problem

D

Dave Johnston

Hey,

I'm trying to get SmtpMail to work. Problem is, each time I call
SmtpMail.Send(msg) it throws this exception:

The specified module could not be found.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: The specified
module could not be found.

I've checked InnerException, but it's always null.

This is on ASP.NET 1.1 running on XP Pro SP2. CDO is installed.

The MailMessage object is properly-formed, and the SmtpServer I set
works too (I've tried several, including creating my own on localhost,
but the error never disappears).

Any ideas?
 
J

Juan T. Llibre

Could you post the complete code
which produces the error you get ?

Please substitute any sensitive information
in the code before posting it.

Thanks!



Juan T. Llibre
ASP.NET MVP
===========
 
D

Dave Johnston

Sure, I've replaced the 'xxxxxxx' fields, obviously :)

MailMessage msg = new MailMessage();
msg.To = "xxxxx@xxxxxx";
msg.From = "xxxxx@xxxxxx";
msg.Subject = "Account Statement for " + u.Username;
msg.Body = "test";
SmtpMail.SmtpServer = "xxxxxxxx";
try {
SmtpMail.Send(msg);
} catch(Exception ex) {
while(ex.InnerException != null) {
ex = ex.InnerException;
}
throw ex;
}
 

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,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top