How do I write this for C#?

Aug 3 2007 10:37 PM

I have been at this all day.  Trying to write it to work for C# feedback page.

Protected Sub Wizard1_FinishButtonClick(object sender, WizardNavigationEventArgs e)


   SendMail(txtEmail.Text, txtComments.Text)

End Sub


Private Sub Sendmail(ByVal from As String, ByVal body As String)

    Dim mailServerName As String = "company.company.com" 
    Dim message As MailMessage = New MailMessage(from, "[email protected]")
    Dim mailClient As SmtpClient = New SmtpClient


    mailClient.Host = mailServerName
    mailClient.Send(message)
    message.Dispose


 End Sub
End Class

Answers (1)