Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
Visual Basic Forum for Visual Basic Programmers VB Forum Index » .NET General

Post new topic   Reply to topic
Sending e-mail
View previous topic :: View next topic  
Author Message
2chin
Freshman


Joined: 26 Jan 2004
Posts: 30
Location: Russia

PostPosted: Nov 10th, 2005 03:02 AM    Post subject: Sending e-mail Reply with quote

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
View user's profile Send private message Send e-mail ICQ Number
P.T.A.M.
Administrator


Joined: 08 Oct 2003
Posts: 752
Location: Greece

PostPosted: Nov 12th, 2005 05:11 AM    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website ICQ Number
2chin
Freshman


Joined: 26 Jan 2004
Posts: 30
Location: Russia

PostPosted: Nov 14th, 2005 04:05 AM    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail ICQ Number
Display posts from previous:   
Post new topic   Reply to topic    Visual Basic Forum for Visual Basic Programmers VB Forum Index » .NET General All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Visual Basic Forum runs phpBB | Forum Template © iOptional
VB Resources | SSL | Visual Basic