email not getting 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. The "Response.Write
Thanks" is shown but the email doesn't go.


<%
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
%>
 
H

Harvey Waxman

Never mind.

Harvey Waxman said:
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. The "Response.Write
Thanks" is shown but the email doesn't go.


<%
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
%>
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top