webForumDet fria alternativet

Upplägg av email resultat!

ASP

2 svar · 170 visningar · startad av Hallgren

Medlem sedan dec. 19991 606 inlägg
Frågan#1

Yo!
Använder:


<%
Set CDOMail = Server.CreateObject("CDONTS.NewMail")
CDOMail.From = Request.Form("mail")
CDOMail.To = "xxx@xxx.xx"
CDOMail.Subject = "Från mailformulär"
CDOMail.Body = Request.Form("antalsnickar") & Request.Form("lusthus") & Request.Form("trasmattor") & Request.Form("vackert") & Request.Form("kuddar") & Request.Form("levande") & Request.Form("kalender")& Request.Form("grona") & Request.Form("namn") & Request.Form("gata") & Request.Form("postnr") & Request.Form("stad") & Request.Form("mail")
CDOMail.Send
Set CDOMail = Nothing

Response.Redirect("http://www.akantusedition.se/tack.html")
%>

Men får ett rätt tråkigt resultat. :(

"2, Snickarglädje - 350kr3, Länge Leve Lusthusen - 350kr3, Alla Tiders
Trasmattor - 350kr3, Vackert Att Väva - 325kr3, Alla Tiders Trasmattor -
325kr3, En Livs Levande Bok - 350kr3, Vävkalender 2000 -
150krHallgrentesttesttesttest"

Hur gör jag så at det ställs upp lite snyggare?

------------------
Forumledare, webForum

Medlem sedan sep. 2000232 inlägg
#2

använd vbCrlf (radbrytning) enligt principen:

CDOMAil.Body = Request.Form("antalsnickar") & vbCrlf & Request.Form ...
Medlem sedan sep. 2000314 inlägg
#3

Testa med html.

<%
Dim cdoMail 
Set cdoMail = CreateObject("CDONTS.NewMail") 
 
HTML = "<!DOCTYPE HTML PUBLIC ""-//IETF//DTD HTML//EN"">" & NL 
HTML = HTML & "<html>" 
HTML = HTML & "<head>" 
HTML = HTML & "<meta http-equiv=""Content-Type""" 
HTML = HTML & "HTML = HTML & ""content=""text/html; charset=iso-8859-1"">""" 
HTML = HTML & "<title>Från mailformulär</title>" 
HTML = HTML & "</head>" 
HTML = HTML & "<body>"
HTML = HTML & "<table border=""0"" width=""100%""><tr>" &_
"<td width=""100%"">" & Request.Form("antalsnickar") & "</td></tr><tr>" &_
"<td width=""100%"">" & Request.Form("lusthus") & "</td></tr><tr>" &_
"<td width=""100%"">" & Request.Form("trasmattor") & "</td></tr><tr>" &_
"<td width=""100%"">" & Request.Form("vackert") & "</td></tr><tr>" &_
"<td width=""100%"">" & Request.Form("kuddar") & "</td></tr></table>"

HTML = HTML & "</html>" 
cdoMail.From = "xxxxx@xxxxx.com"
cdoMail.To = "xxxxx@xxxxx.com" 
cdoMail.Subject = "Från mailformulär" 
cdoMail.BodyFormat = 0 
cdoMail.MailFormat = 0 
cdoMail.Body = HTML 
cdoMail.Send 
Set cdoMail = Nothing 
%>
275 ms totalt · 4 externa anrop · v20260731065814-full.2f471f9e
132 ms — deklarationer (db)
0 ms — hämta statistik (cache)
139 ms — hämta tråd, inlägg och bilagor (db)
123 ms — ändringar (db)