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

Discussion in 'ASP General' started by techy techno, Feb 24, 2004.

  1. techy techno

    techy techno Guest

    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

    %>

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    techy techno, Feb 24, 2004
    #1
    1. Advertising

  2. techy techno

    Ray at Guest

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

    --

    Ray at home
    Microsoft ASP MVP


    "techy techno" <> wrote in message
    news:u6$r8St%...
    >
    >
    >
    > 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
    >
    > %>
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    Ray at, Feb 24, 2004
    #2
    1. Advertising

  3. techy techno

    Jeff Cochran Guest

    On Tue, 24 Feb 2004 04:50:08 -0800, techy techno
    <> wrote:

    >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

    >
    >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
    >
    >%>
    >
    >*** Sent via Developersdex http://www.developersdex.com ***
    >Don't just participate in USENET...get rewarded for it!
    Jeff Cochran, Feb 24, 2004
    #3
  4. techy techno

    Chris Barber Guest

    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.

    "techy techno" <> wrote in message
    news:u6$r8St%...



    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

    %>

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Chris Barber, Feb 24, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Keith G
    Replies:
    0
    Views:
    1,628
    Keith G
    Sep 8, 2003
  2. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,762
    Smokey Grindel
    Dec 2, 2006
  3. Devin Jeanpierre
    Replies:
    2
    Views:
    430
    Devin Jeanpierre
    Feb 14, 2012
  4. fred
    Replies:
    3
    Views:
    260
    Zifud
    Mar 17, 2005
  5. Replies:
    5
    Views:
    867
Loading...

Share This Page