system.web.mail.StmpMail problem

  • Thread starter Thread starter Dave Johnston
  • Start date Start date
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?
 
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
===========
 
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;
}
 
Back
Top