473,385 Members | 1,445 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

email not getting sent.

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 = "xx**@xxxxx.com" (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 "<bEmail</b><br>"
END IF
IF strSubject<"" THEN
ELSE
Response.Write "<bSubject</b><br>"
END IF
IF strComments <"" THEN
ELSE
Response.Write "<bComments</b><br>"
END IF
END IF
%>
--
Harvey Waxman
remove spam to email
http://righttax.org/
Dec 2 '06 #1
1 1283
Never mind.

In article <sp*******************************@news.lga.highwi nds-media.com>,
Harvey Waxman <sp*********@cox.netwrote:
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 = "xx**@xxxxx.com" (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 "<bEmail</b><br>"
END IF
IF strSubject<"" THEN
ELSE
Response.Write "<bSubject</b><br>"
END IF
IF strComments <"" THEN
ELSE
Response.Write "<bComments</b><br>"
END IF
END IF
%>


--
Harvey Waxman
remove spam to email
http://righttax.org/
Dec 2 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jagdip Singh Ajimal | last post by:
I have setup an email notifications system, that basically takes each row from a table and sents out an email according to the data in that row. The emails get sent, with the subject being filled...
5
by: mantrid | last post by:
Up to the other day I have not bothered protecting my php script on my feedback form against email injection. Howerver, i have had a spammer using it to insert email addresses as cc: bc: into my...
4
by: shivamverma | last post by:
Hi, Everyone I m working on a complaint management site and one of the requirement is sending a email to the administrator. I changed the php.ini file now it looks like SMTP = my outgoing...
2
by: Comcast | last post by:
I am using a form that uses PHP to create an e-mail and send it off. When the script runs, I get an error page, although the e-mail is sent off. The error I am getting is: Warning:...
3
by: IGD | last post by:
I don't know if this is the right place to post this or not. If not, could someone direct me elsewhere where I would find more information on how to solve my problem? Thanks! My problem is this:...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.