Author: Roosker | Posted on: 6/16/2010 7:19:39 AM | Views : 277

I've built several websites on my local machine and have successfully tested sending mail from within the application, but suddenly the mail won't go anywhere!  I have a try-catch routine, and I'm getting the message that the mail has been sent successfully but it's not going anywhere. This is the code that I've used in a test page - the html page has a button and a textbox and nothing else. I've imported the system.net.mail namespace.
 
Protected Sub btnSendMail_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSendMail.Click Dim MailServer As New SmtpClient MailServer.Host = "localhost" MailServer.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis Dim msg As New MailMessage msg.From = New MailAddress("email@domain.com") msg.To.Add(New MailAddress("email@domain2.ie")) ...

Go to the complete details ...