Is there a way to separate strings in Classic ASP

Please support our ASP advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Reply

Join Date: Oct 2006
Posts: 19
Reputation: doraima29 is an unknown quantity at this point 
Solved Threads: 0
doraima29 doraima29 is offline Offline
Newbie Poster

Is there a way to separate strings in Classic ASP

 
0
  #1
Dec 19th, 2007
Hi,

Is there a way to separate strings in Classic ASP?

Here is the sample of the CODE:
<%@ Language=VBScript %>

<%
Option Explicit
%>

<%
' -----------------------------------------------------
' CDONTS Email send script
' © http://www.designplace.org/
' Comments must remain intact for re-use of this code
' -----------------------------------------------------

dim strFName, strLName, strEmailOne, strEmailTwo, strSchoolName, strAddress, strCity, strState, strCountry, strZipcode, strMessage, strQuestion1, strQuestion2,strQuestion3

strFName = Request.Form("fname") ' holds inputted first name
strLName = Request.Form("lname") ' holds inputted last name
strSchoolName = Request.Form("schoolname") ' holds inputted school name
strAddress = Request.Form("address") ' holds inputted school address
strCity = Request.Form("city") ' holds inputted school city
strState = Request.Form("states").Item ' holds selection of states
strZipcode = Request.Form("zipcode") ' holds zipcode or postal code
strCountry = Request.Form("country").Item ' holds selection of Country either Canada and United States
'strEmailOne = Request.Form("emailOne") ' holds inputted email address
strEmailTwo = Request.Form("emailTwo") ' holds inputted email address
strMessage = Request.Form("message") ' holds inputted message
strQuestion1 = Request.Form("edulevels").Item ' drop down list selection
strQuestion2 = Request.Form("OS").Item ' drop down list selection
strQuestion3 = Request.Form("softwareFormats").Item ' drop down list selection


dim objMail

Set objMail = Server.CreateObject("CDO.Message")
'Set objMail = CreateObject("CDONTS.NewMail")

' -- email variables --
objMail.From = Trim("feedback@avanquestusa.com")
objMail.To = Trim(strEmailTwo)
objMail.Subject = "Promotional Code for Avanquest Software Educator Perks Program"
'objMail.BodyFormat = "0" ' HTML format
objMail.TextBody = "Thank you" & Trim(strFName) & Trim(strLName) & "for submitting your application to Avanquest Software Educators Perks Program." & vbCrLf _
& vbCrLf _
& "School Information " & vbCrLf _
& vbCrLf _
& "School Name: " & Trim(strSchoolName) & vbCrLf _
& "School Address: " & Trim(strAddress) & Trim(strCity) & Trim(strState) & Trim(strZipcode) & vbCrLf _
& Trim(strCountry) & vbCrLf _
& vbCrLf _
& "You primarily work help students in: " & Trim(strQuestion1) & vbCrLf _
& vbCrLf _
& "The most common operating system used at your school is " & Trim(strQuestion2) & vbCrLf _
& vbCrLf _
& "Most of your current school software is " & Trim(strQuestion3) & vbCrLf _
& vbCrLf _
& "These are the products I want for the classroom which I cannot find on your website or from other publishers: " & Trim(strMessage)

' -- send the email --
objMail.Send()

' -- clean up object
Set objMail = Nothing

' -- execute confirmation page
Response.Redirect "thankyou.asp"
%>

-----------------------------------------------------
However the outcome of the email shows:
Thank youMIckJaggerfor submitting your application to Special Program

School Information

School Name: OhlineCollege

School Address: 23 jordan wayFremontCA94536
USA

You primarily work help students in: Grades 4 and 5

The most common operating system used at your school is Windows XP

Is there a way to separate the email in between spaces for the highlighted text. Each of the fields shown above are inputted by the user.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 113
Reputation: hielo is on a distinguished road 
Solved Threads: 17
hielo hielo is offline Offline
Junior Poster

Re: Is there a way to separate strings in Classic ASP

 
0
  #2
Dec 20th, 2007
You just need to add spaces:
  1. <%@ Language=VBScript %>
  2.  
  3. <%
  4. Option Explicit
  5. %>
  6.  
  7. <%
  8. ' -----------------------------------------------------
  9. ' CDONTS Email send script
  10. ' © http://www.designplace.org/
  11. ' Comments must remain intact for re-use of this code
  12. ' -----------------------------------------------------
  13.  
  14. dim strFName, strLName, strEmailOne, strEmailTwo, strSchoolName, strAddress, strCity, strState, strCountry, strZipcode, strMessage, strQuestion1, strQuestion2,strQuestion3
  15.  
  16. strFName = Request.Form("fname") ' holds inputted first name
  17. strLName = Request.Form("lname") ' holds inputted last name
  18. strSchoolName = Request.Form("schoolname") ' holds inputted school name
  19. strAddress = Request.Form("address") ' holds inputted school address
  20. strCity = Request.Form("city") ' holds inputted school city
  21. strState = Request.Form("states").Item ' holds selection of states
  22. strZipcode = Request.Form("zipcode") ' holds zipcode or postal code
  23. strCountry = Request.Form("country").Item ' holds selection of Country either Canada and United States
  24. 'strEmailOne = Request.Form("emailOne") ' holds inputted email address
  25. strEmailTwo = Request.Form("emailTwo") ' holds inputted email address
  26. strMessage = Request.Form("message") ' holds inputted message
  27. strQuestion1 = Request.Form("edulevels").Item ' drop down list selection
  28. strQuestion2 = Request.Form("OS").Item ' drop down list selection
  29. strQuestion3 = Request.Form("softwareFormats").Item ' drop down list selection
  30.  
  31.  
  32. dim objMail
  33.  
  34. Set objMail = Server.CreateObject("CDO.Message")
  35. 'Set objMail = CreateObject("CDONTS.NewMail")
  36.  
  37. ' -- email variables --
  38. objMail.From = Trim("feedback@avanquestusa.com")
  39. objMail.To = Trim(strEmailTwo)
  40. objMail.Subject = "Promotional Code for Avanquest Software Educator Perks Program"
  41. 'objMail.BodyFormat = "0" ' HTML format
  42. objMail.TextBody = "Thank you " & Trim(strFName) & Trim(strLName) & " for submitting your application to Avanquest Software Educators Perks Program." & vbCrLf _
  43. & vbCrLf _
  44. & "School Information " & vbCrLf _
  45. & vbCrLf _
  46. & "School Name: " & Trim(strSchoolName) & vbCrLf _
  47. & "School Address: " & Trim(strAddress) & " " & Trim(strCity) & " " & Trim(strState) & " " & Trim(strZipcode) & vbCrLf _
  48. & Trim(strCountry) & vbCrLf _
  49. & vbCrLf _
  50. & "You primarily work help students in: " & Trim(strQuestion1) & vbCrLf _
  51. & vbCrLf _
  52. & "The most common operating system used at your school is " & Trim(strQuestion2) & vbCrLf _
  53. & vbCrLf _
  54. & "Most of your current school software is " & Trim(strQuestion3) & vbCrLf _
  55. & vbCrLf _
  56. & "These are the products I want for the classroom which I cannot find on your website or from other publishers: " & Trim(strMessage)
  57.  
  58. ' -- send the email --
  59. objMail.Send()
  60.  
  61. ' -- clean up object
  62. Set objMail = Nothing
  63.  
  64. ' -- execute confirmation page
  65. Response.Redirect "thankyou.asp"
  66. %>
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 19
Reputation: doraima29 is an unknown quantity at this point 
Solved Threads: 0
doraima29 doraima29 is offline Offline
Newbie Poster

Re: Is there a way to separate strings in Classic ASP

 
0
  #3
Dec 20th, 2007
thanks, I got it. I really appreciate your help!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC