<%
Option Explicit
'Do they want an email?
If Request.Form("chkEmail") <> "" Then
'is the email address filled in?
If Request.Form("txtEmail") = "" Then
'no email!
Response.Write "You didn't enter your email address and I can't read minds today, sorry."
Response.End
End If
'checked and address submitted, lets send it
'Copied From: [url=http://www.w3schools.com/asp/asp_send_email.asp] W3Schools.com[/url]
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="mymail@mydomain.com"
myMail.To=Request.Form("txtEmail")
myMail.TextBody="Hi There! This is me message to you! Thanks for checking my checkbox."
myMail.Send
set myMail=nothing
Response.Write "Your email has been sent."
Else
Response.Write "Since you didn't check the checkbox, I didn't email you. Thanks anyways."
End If
%>