Author: Benjo | Posted on: 7/11/2009 4:20:42 AM | Views : 212

Hi all
I have followed a tutorial on creating a feedback form and used the SendMail code provided to email the completed form back to myself The code i have used is:

    Protected Sub Wizard1_FinishButtonClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs) Handles Wizard1.FinishButtonClick
        SendMail(txtEmail.Text, txtComments.Text)
    End Sub
    Private Sub SendMail(ByVal from As String, ByVal body As String)
        Dim mailServerName As String = "0.0.0.00"
        Dim message As MailMessage = New MailMessage(from, "test@yoursite.co.uk", "feedback", body)
        Dim mailClient As SmtpClient = New SmtpClient
   ...

Go to the complete details ...