Re: system.web.mail.StmpMail problem
From: Dave Johnston (davej_at_davej.davej)
Date: 01/19/05
- Next message: darrel: "Our server just went down...what might be causing this?"
- Previous message: Juan T. Llibre: "Re: system.web.mail.StmpMail problem"
- In reply to: Juan T. Llibre: "Re: system.web.mail.StmpMail problem"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 19 Jan 2005 22:11:59 +0000
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;
}
Juan T. Llibre wrote:
> 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
> ===========
> "Dave Johnston" <davej@davej.davej> wrote in message
> news:41eed716$0$14562$cc9e4d1f@news.dial.pipex.com...
>
>>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?
>
>
>
- Next message: darrel: "Our server just went down...what might be causing this?"
- Previous message: Juan T. Llibre: "Re: system.web.mail.StmpMail problem"
- In reply to: Juan T. Llibre: "Re: system.web.mail.StmpMail problem"
- Messages sorted by: [ date ] [ thread ]