I'm not sure where to put the code:
Imports System.Web.Mail
Here's my page from the top to the Title tag.
<%@ Page Language="
VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim sMsg As String
sMsg += "Hi there - here's the information I entered in the form." & vbCrLf
sMsg += "Name : " & txtName.Text & vbCrLf
sMsg += "Phone : " & txtPhone.Text & vbCrLf
sMsg += "Email : " & txtEmail.Text & vbCrLf
sMsg += "Comments : " & txtComments.Text & vbCrLf
Dim objEmail As New Mail.MailMessage
objEmail.To = txtEmail.text
objEmail.BCC = "" '<--- this would be where you can send it to yourself at the same time.
objEmail.FROM = ""
objEmail.SUBJECT = "Here's the subject of the email"
objEmail.BODY = sMsg
SmtpMail.SmtpServer = ""
SmtpMail.Send(objEmail)
Response.Redirect("")
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Quest Realty - Contact Us</title>