email doesn't get sent

H

Harvey Waxman

Can someone see why this asp validation script doesn't send the email? The
validations work as expected the with JS turned on or off but the email never
gets processed. The middle portion is lifted directly from my standard asp
file which works fine without the asp validation code.


<%
DIM strEmail, strSubject, strComments
strEmail = Request.Form("Email")
strSubject = Request.Form("Subject")
strComments = Request.Form("Comments")
IF strEmail <> "" AND strSubject <> "" AND strComments <> "" THEN

Dim ObjMail
Set ObjMail = Server.CreateObject("CDONTS.NewMail")
ObjMail.To = "(e-mail address removed)" (blanked for security)
ObjMail.From = Email
ObjMail.Subject = "Email"
ObjMail.Body = "Name" & vbtab & FirstName & vbcrlf&_
"Email" & vbtab & Email & vbcrlf&_
"Comments" & vbtab & Comments
ObjMail.Send
Set ObjMail = Nothing
Response.Write "Thanks"

ELSE
Response.Write "<p>Please click back on your browser and complete the
following fields:</p>"
IF strEmail <> "" THEN
ELSE
Response.Write "<b> Email</b><br>"
END IF
IF strSubject<> "" THEN
ELSE
Response.Write "<b> Subject</b><br>"
END IF
IF strComments <> "" THEN
ELSE
Response.Write "<b> Comments</b><br>"
END IF
END IF
%>
 
M

Mark Rae

Can someone see why this asp validation script doesn't send the email?

This group is for ASP.NET, not ASP.

Please post any queries related to ASP in:
microsoft.public.inetserver.asp.general
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top