URGENT : I am 100 % sure there is nothing wrong in the ASP code..BUT why is it not working

T

techy techno

Hii I am trying to write down a cdont aplication which will email the
survey form to the TO address with the answers checked by the user using
the survey form

I am 100% sure that there is nothing wrong in the code then why is it
not working.

It doesn't work on my machine or it works on the usa web server. whats
wrong. ?

what I have seen is that until I had 2 questions everything was fine.
but the time I added more questions it stopped working

is it that the CDONTS is limited to the number of characters it can send
?

please help

thanks

<%Response.Buffer = True %>
<%
Dim objMail
Dim MailBody
Dim kaun
Dim reserv
Dim reception
Dim House
Dim Food
Dim Staff
DIm hear

reserv = Request.Form("handled")
reception = Request.Form("recep")
House =Request.Form("clean")
Food = Request.Form("meal")
Staff = Request.Form("opi")
hear = Request.Form("hear")
kaun = request.Form("txtKaun")
Set objMail = Server.CreateObject("CDONTS.NewMail")

MailBody = "Name :" + Request.Form("fromName") + "!" + vbCrLf + vbCrLf
+ " Email :" + Request.Form("fromEmail") + vbCrLf + vbCrLf
MailBody = MailBody + "Phone # " + Request.Form("txtPhone") + vbCrLf +
vbCrLf + "Country : " + Request.Form("select6") + vbCrLf + vbCrLf
MailBody = MailBody + "http://www.hawarresort.com/" + vbCrLf + vbCrLf +
vbCrLf + "Sent by " + Request.Form("FromName")
MailBody = MailBody + " using the Survey Form at
http://www.hawarresort.com" + vbCrLf + vbCrLf + vbCrLf + "FEEDBACK" +
vbCrLf + vbCrLf
MailBody = MailBody + "Q1. How was your reservation Handled ? " +
vbCrLf + "Ans : " + Request.Form("handled") + vbCrLf + vbCrLf
MailBody = MailBody + "Q2. How was your checkin at the Reception ? " +
vbCrLf + "Ans: " + Request.Form("recep") + vbCrLf + vbCrLf
MailBody = MailBody + "Q3. How was the Housekeeping Service and
Cleanliness ?" + vbCrLf + "Ans: " + Request.Form("clean") + vbCrLf
MailBody = MailBody + "Q4. How was the Food and Beverage Service and
Quality ? " + vbCrlF + "Ans: " + Request.Form("meal")
MailBody = MailBody + "Q5. Your Opinion about the Staff ?" + vbCrLf +
"Ans: " + Request.Form("opi") + vbCrLf
MailBody = MailBody +"Q6. How did you know about the Hawar Resort Hotel
? " + vbCrLf + "Ans: " + Request.Form("hear") + ""
objMail.Subject = "New Survey Feedback By : " +
Request.Form("fromName")
objMail.To = kaun
objMail.Body = MailBody
objMail.Send

'You should always do this with CDONTS.
set objMail = nothing

%>
 
R

Ray at

What doesn't work? What error do you get? What results do you get that you
don't expect?
 
J

Jeff Cochran

Hii I am trying to write down a cdont aplication which will email the
survey form to the TO address with the answers checked by the user using
the survey form

I am 100% sure that there is nothing wrong in the code then why is it
not working.

It doesn't work on my machine or it works on the usa web server. whats
wrong. ?

We can't tell. You haven't even told us how you know it's not
working. Error messages, expected results that don't occur, where
your messages, if any, actually end up and so on.

Jeff
 
C

Chris Barber

Try using '&' (concatenation) as opposed to '+' for building the string.

Also try debugging by outputting the variable values to the browser and not
sending:

objMail.To = kaun
objMail.Body = MailBody

Response.Write "MailTo: " & kaun & "<br/>"
'etc.

'Don't bother sending - we're only debugging.
'objMail.Send

Chris.




Hii I am trying to write down a cdont aplication which will email the
survey form to the TO address with the answers checked by the user using
the survey form

I am 100% sure that there is nothing wrong in the code then why is it
not working.

It doesn't work on my machine or it works on the usa web server. whats
wrong. ?

what I have seen is that until I had 2 questions everything was fine.
but the time I added more questions it stopped working

is it that the CDONTS is limited to the number of characters it can send
?

please help

thanks

<%Response.Buffer = True %>
<%
Dim objMail
Dim MailBody
Dim kaun
Dim reserv
Dim reception
Dim House
Dim Food
Dim Staff
DIm hear

reserv = Request.Form("handled")
reception = Request.Form("recep")
House =Request.Form("clean")
Food = Request.Form("meal")
Staff = Request.Form("opi")
hear = Request.Form("hear")
kaun = request.Form("txtKaun")
Set objMail = Server.CreateObject("CDONTS.NewMail")

MailBody = "Name :" + Request.Form("fromName") + "!" + vbCrLf + vbCrLf
+ " Email :" + Request.Form("fromEmail") + vbCrLf + vbCrLf
MailBody = MailBody + "Phone # " + Request.Form("txtPhone") + vbCrLf +
vbCrLf + "Country : " + Request.Form("select6") + vbCrLf + vbCrLf
MailBody = MailBody + "http://www.hawarresort.com/" + vbCrLf + vbCrLf +
vbCrLf + "Sent by " + Request.Form("FromName")
MailBody = MailBody + " using the Survey Form at
http://www.hawarresort.com" + vbCrLf + vbCrLf + vbCrLf + "FEEDBACK" +
vbCrLf + vbCrLf
MailBody = MailBody + "Q1. How was your reservation Handled ? " +
vbCrLf + "Ans : " + Request.Form("handled") + vbCrLf + vbCrLf
MailBody = MailBody + "Q2. How was your checkin at the Reception ? " +
vbCrLf + "Ans: " + Request.Form("recep") + vbCrLf + vbCrLf
MailBody = MailBody + "Q3. How was the Housekeeping Service and
Cleanliness ?" + vbCrLf + "Ans: " + Request.Form("clean") + vbCrLf
MailBody = MailBody + "Q4. How was the Food and Beverage Service and
Quality ? " + vbCrlF + "Ans: " + Request.Form("meal")
MailBody = MailBody + "Q5. Your Opinion about the Staff ?" + vbCrLf +
"Ans: " + Request.Form("opi") + vbCrLf
MailBody = MailBody +"Q6. How did you know about the Hawar Resort Hotel
? " + vbCrLf + "Ans: " + Request.Form("hear") + ""
objMail.Subject = "New Survey Feedback By : " +
Request.Form("fromName")
objMail.To = kaun
objMail.Body = MailBody
objMail.Send

'You should always do this with CDONTS.
set objMail = nothing

%>
 

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,710
Latest member
bernietqt

Latest Threads

Top