Author: mattcase | Posted on: 8/10/2009 1:38:44 PM | Views : 419

 I am having trouble getting my "Contact Us" aspx page to send the email. Would someone please look it over and see if you could offer some suggestions?
Imports System.Net.Mail Partial Class Contact2 Inherits System.Web.UI.Page Protected Sub Wizard1_FinishButtonClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs) Handles Wizard1.FinishButtonClick SendMail(emailTextBox.Text, commentsTextBox.Text) End Sub Protected Sub SendMail(ByVal sender As Object, ByVal e As EventArgs) If IsPostBack Then Dim sc As SmtpClient = New SmtpClient("smtp.host.net") Dim sb As StringBuilder = New StringBuilder() Dim msg As MailMessage = Nothing sb.Append("Email from: " + emailTextBox.Text + vbCrLf) sb.Append("Name : " + nameTextBox.Text + vbCrLf) sb.Append(&q ...

Go to the complete details ...