I am using -
<%
email = request.form("email"
Dim objMail
Set objMail = Server.CreateObject("CDONTS.NewMail"
objMail.From = email
objMail.Subject = "Newsletter Sign Up"
objMail.To = "OurEmail"
body = "Name" & vbcrlf & request.form("name" & vbcrlf & vbcrlf
body = body & "Email" & vbcrlf & request.form("email" & vbcrlf & vbcrlf
objMail.Body = body
objMail.Send
Set objMail = nothing
%>
which works fine. However I wish to add some evaluation of the two fields, i.e. if one or both is empty and/or the email address field does not contain a valid email address then a pop-up informs the user. They then click a back button to try again.
Thanks
Pete Boys
<%
email = request.form("email"
Dim objMail
Set objMail = Server.CreateObject("CDONTS.NewMail"
objMail.From = email
objMail.Subject = "Newsletter Sign Up"
objMail.To = "OurEmail"
body = "Name" & vbcrlf & request.form("name" & vbcrlf & vbcrlf
body = body & "Email" & vbcrlf & request.form("email" & vbcrlf & vbcrlf
objMail.Body = body
objMail.Send
Set objMail = nothing
%>
which works fine. However I wish to add some evaluation of the two fields, i.e. if one or both is empty and/or the email address field does not contain a valid email address then a pop-up informs the user. They then click a back button to try again.
Thanks
Pete Boys