Subject: ASP mail results with no line break
Posted By: peternes Post Date: 11/14/2004 1:26:08 PM
I need help with ASP. Form results need to come on the same line. Now they show up lke this:

Name:
Peter Nes
Address:
Kings rd. ...and so on. But I want them too look like this:

Name: Peter Nes
Address: Kings rd  

In other words on the same row (subject and result)
Can anyone help? here is the code:
<%
Dim t1name,t1,t2name,t2,t3name,t3,t4name,t4,t5name,t5,t6name,t6,t7name,t7,t8name,t8,t9name,t9,t10name,t10,t11name,t11,t12name,t12,t13name,t13,t14name,t14,t15name,t15,t16name,t16

t1name = "namn"
t1 = Request.Form("t1")
t2name = "företag"
t2 = Request.Form("t2")
t3name = "adress"
t3 = Request.Form("t3")
t4name = "postadress"
t4 = Request.Form("t4")
t5name = "telefon"
t5 = Request.Form("t5")
t6name = "epost"
t6 = Request.Form("t6")
t7name = "snabbexpo"
t7 = Request.Form("t7")
t8name = "quickscreen"
t8 = Request.Form("t8")
t9name = "banner/smartstand"
t9 = Request.Form("t9")
t10name = "tower"
t10 = Request.Form("t10")
t11name = "expand2000"
t11 = Request.Form("t11")
t12name = "bigfabric"
t12 = Request.Form("t12")
t13name = "vario"
t13 = Request.Form("t13")
t14name = "mässmonter"
t14 = Request.Form("t14")
t15name = "broschyrställ"
t15 = Request.Form("t15")
t16name = "diskar"
t16 = Request.Form("t16")

Dim stname,st
stname = "önskemål"
st = Request.Form("st")



Dim ObjMail
Set ObjMail = Server.CreateObject("CDONTS.NewMail")
ObjMail.To = "peter@waterlinemediadesign.com"
'in the next line you can change that email address to something else
'like "myform@myurl.com", just be sure and put it between quotes " "
ObjMail.From = "peter@waterlinemediadesign.com"
'you can also change "Form Submission" to something else like "form results" etc.
ObjMail.Subject = "Epost från hemsidan"
ObjMail.Body = t1name & vbcrlf&_
t1 & vbcrlf&_
t2name & vbcrlf&_
t2 & vbcrlf&_
t3name & vbcrlf&_
t3 & vbcrlf&_
t4name & vbcrlf&_
t4 & vbcrlf&_
t5name & vbcrlf&_
t5 & vbcrlf&_
t6name & vbcrlf&_
t6 & vbcrlf&_
t7name & vbcrlf&_
t7 & vbcrlf&_
t8name & vbcrlf&_
t8 & vbcrlf&_
t9name & vbcrlf&_
t9 & vbcrlf&_
t10name & vbcrlf&_
t10 & vbcrlf&_
t11name & vbcrlf&_
t11 & vbcrlf&_
t12name & vbcrlf&_
t12 & vbcrlf&_
t13name & vbcrlf&_
t13 & vbcrlf&_
t14name & vbcrlf&_
t14 & vbcrlf&_
t15name & vbcrlf&_
t15 & vbcrlf&_
t16name & vbcrlf&_
t16 & vbcrlf&_

stname & vbcrlf&_
st



ObjMail.Send
Set ObjMail = Nothing
'HERE you make a choice. You can redirect the user to any page in your site
Response.Redirect "tack.html"
'Or just say thanks. Delete the line you dont want. Either above or below
Response.Write"Thank You"
<%
Dim t1name,t1,t2name,t2,t3name,t3,t4name,t4,t5name,t5,t6name,t6,t7name,t7,t8name,t8,t9name,t9,t10name,t10,t11name,t11,t12name,t12,t13name,t13,t14name,t14,t15name,t15,t16name,t16

t1name = "namn"
t1 = Request.Form("t1")
t2name = "företag"
t2 = Request.Form("t2")
t3name = "adress"
t3 = Request.Form("t3")
t4name = "postadress"
t4 = Request.Form("t4")
t5name = "telefon"
t5 = Request.Form("t5")
t6name = "epost"
t6 = Request.Form("t6")
t7name = "snabbexpo"
t7 = Request.Form("t7")
t8name = "quickscreen"
t8 = Request.Form("t8")
t9name = "banner/smartstand"
t9 = Request.Form("t9")
t10name = "tower"
t10 = Request.Form("t10")
t11name = "expand2000"
t11 = Request.Form("t11")
t12name = "bigfabric"
t12 = Request.Form("t12")
t13name = "vario"
t13 = Request.Form("t13")
t14name = "mässmonter"
t14 = Request.Form("t14")
t15name = "broschyrställ"
t15 = Request.Form("t15")
t16name = "diskar"
t16 = Request.Form("t16")

Dim stname,st
stname = "önskemål"
st = Request.Form("st")



Dim ObjMail
Set ObjMail = Server.CreateObject("CDONTS.NewMail")
ObjMail.To = "peter@waterlinemediadesign.com"
'in the next line you can change that email address to something else
'like "myform@myurl.com", just be sure and put it between quotes " "
ObjMail.From = "peter@waterlinemediadesign.com"
'you can also change "Form Submission" to something else like "form results" etc.
ObjMail.Subject = "Epost från hemsidan"
ObjMail.Body = t1name & vbcrlf&_
t1 & vbcrlf&_
t2name & vbcrlf&_
t2 & vbcrlf&_
t3name & vbcrlf&_
t3 & vbcrlf&_
t4name & vbcrlf&_
t4 & vbcrlf&_
t5name & vbcrlf&_
t5 & vbcrlf&_
t6name & vbcrlf&_
t6 & vbcrlf&_
t7name & vbcrlf&_
t7 & vbcrlf&_
t8name & vbcrlf&_
t8 & vbcrlf&_
t9name & vbcrlf&_
t9 & vbcrlf&_
t10name & vbcrlf&_
t10 & vbcrlf&_
t11name & vbcrlf&_
t11 & vbcrlf&_
t12name & vbcrlf&_
t12 & vbcrlf&_
t13name & vbcrlf&_
t13 & vbcrlf&_
t14name & vbcrlf&_
t14 & vbcrlf&_
t15name & vbcrlf&_
t15 & vbcrlf&_
t16name & vbcrlf&_
t16 & vbcrlf&_

stname & vbcrlf&_
st



ObjMail.Send
Set ObjMail = Nothing
'HERE you make a choice. You can redirect the user to any page in your site
Response.Redirect "tack.html"
'Or just say thanks. Delete the line you dont want. Either above or below
Response.Write"Thank You"
%>


Reply By: happygv Reply Date: 11/15/2004 2:01:33 AM
That is because you use a VBCRLF there, where you wanted it to be on the same line.
ObjMail.Body = t1name & vbcrlf&_
t1 & vbcrlf&_
Which should look like.
ObjMail.Body = t1name " : " & t1 & vbcrlf&_


Use VBCrLF only where you want a LINE BREAK.

Hope that helps.
Cheers!


_________________________
- Vijay G
Strive for Perfection

Go to topic 22119

Return to index page 716
Return to index page 715
Return to index page 714
Return to index page 713
Return to index page 712
Return to index page 711
Return to index page 710
Return to index page 709
Return to index page 708
Return to index page 707