ASP form is troubling me

I have a script I downloaded from an ASP tutorial site. It had a “subject” box and a “body” input box.
I myself have need of 5 boxes in total and I need them displayed in the body of the email.
If Anyone out there who knows ASP can tell me by looking at this asp form belowwhat I must do to have all the input boxes displayed in the body of the email please let me know.

Dim strTo, strSubject, strBody, strWho, strWhen, strHowMany, strEmail, strPhone
Dim objCDOMail 'The CDO object
'#################################################
##############

strTo = “zephn@sympatico.ca”
strSubject = Request.Form(“subject”)
strBody = Request.Form(“body”)
strFrom=request.form(“strwho”)
strPhone=request.form(“strPhone”)
strDate=request.form(“strwhen”)
strPeople=request.form(“strhowmany”)
strBody=request.form(“stremail”)

Set objCDOMail = Server.CreateObject(“CDONTS.NewMail”)
'#################################################
##############

objCDOMail.From = “RSVPForm”
objCDOMail.To = strTo
objCDOMail.Subject = strSubject
objCDOMail.Body = strBody
objCDOMail.Send
Set objCDOMail = Nothing

You just need to combine those additional form values into the CDOmail.body like this.

objCDOMail.Subject = strSubject

strDate = "Date: " + strDate + VbCrLf
strWho = "From: " + strWho + VbCrLf
strPhone = "Phone: " + strPhone + VbCrLf
strPeople = "How many: " + strPeople + VbCrLf + VbCrLf

objCDOMail.Body = strDate + strWho + strPhone + strPeople + strBody

note: VbCrLf is the command for a carriage return with line feed.

Does that all make sense?

abzoid

ASP is kinda picky on this, but you should show your line feeds like this

& vbcrlf & _

that will break the line and wont return errors…Learned this first hand

Actually the “& _” lets the server know that the current command continues on the next line. There is a limit for number of characters on a line, so for the lengthy string commands often used in custom form mail scripts it’s a very handy tool. I like to keep my commands to one line each as I find them easier to debug. Just a personal preference and a throwback to the PASCAL coding I learned over 20 years ago.

abzoid

*Originally posted by 3d-iva *
**ASP is kinda picky on this, but you should show your line feeds like this

& vbcrlf & _

that will break the line and wont return errors…Learned this first hand **

yeah it was the weirdest thing it should have worked the way you have yours but with mine I was getting errors. So when I found that it worked when I did it this way I just kinda kept doing it…