| View previous topic :: View next topic |
| Author |
Message |
2chin Freshman
Joined: 26 Jan 2004 Posts: 30 Location: Russia
|
Posted: Nov 10th, 2005 03:02 AM Post subject: Sending e-mail |
|
|
I need send mails via my soft.
I tried many different examles, but got same error messages.
Ok. Try this code:
| Code: | Dim email As New System.Web.Mail.MailMessage
email.To = "recipient@mail.com"
email.From = "sender@mail.com"
email.Body = "Body"
email.Subject = "Topic"
email.BodyFormat = Web.Mail.MailFormat.Text
System.Web.Mail.SmtpMail.SmtpServer = "smtp.someserver.com"
System.Web.Mail.SmtpMail.Send(email) |
In last line i get following error report:
"An unhandled exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
Additional information: The specified module could not be found."
How i can resolve this problem?
If you know another more simple way to send e-mail please write it
[/code] _________________ In IT we trust |
|
| Back to top |
|
P.T.A.M. Administrator

Joined: 08 Oct 2003 Posts: 752 Location: Greece
|
Posted: Nov 12th, 2005 05:11 AM Post subject: |
|
|
If you try to catch the exception? I don't know .Net that well but I know that in Java you need to catch and handle potential exceptions, even if you know that they'll never happen. _________________ No one is completely useless. They can at least be an example of what to avoid. |
|
| Back to top |
|
2chin Freshman
Joined: 26 Jan 2004 Posts: 30 Location: Russia
|
Posted: Nov 14th, 2005 04:05 AM Post subject: |
|
|
Dear P.T.A.M., when I catch exceptions, I get in message just
"The specified module could not be found". Therefore I turned off temporarily exceptions catching for more detailed error report.
In any case it don't solve my problem. _________________ In IT we trust |
|
| Back to top |
|
|