Hi all,
I'm new to this thing so pls bear with me...I'm using Visual Web Developer 2005 Express to develop a real estate website. I have a feedback form at contact.aspx. It contains the following items: Name, email, phone#, subject (a drop-down list), and a comments box.
1) I'm only receiving the user's email address and the comments. I would also like to receive their name, phone#, and whatever subject they've selected. How do I do this? Here's my
VB code:
Imports System.Net.Mail.SmtpClient
Partial Class contact2
Inherits System.Web.UI.Page
Protected Sub submitButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles submitButton.Click
SendMail(txtEmail.Text, txtComments.Text)
End Sub
Private Sub SendMail(ByVal from As String, ByVal body As String)
Dim mailServerName As String = "smtp.MyDomain.com"
Dim message As MailMessage = New MailMessage(from, "
[email protected]", "feedback", body)
Dim mailClient As SmtpClient = New SmtpClient
mailClient.Host = mailServerName
mailClient.Send(message)
message.Dispose()
End Sub
End Class
Can someone pls help me with this?
2) I would also like to include a confirmation message showing the message has been sent but I don't know how to do it.
Thanks in advance.
AJ
I'm a newbie...so please bear with me...