Sending email with ASP?

Gemma

New member
I currently have an asp form that the user fills in and when they click submit, the info get's stored in a database and also get's sent to me via email.

However, some of the info on the form is autogenerated straight from the database (e.g. username, site name, telephone number) and so isn't showing up in the body of the email.

This is the body part of the email code:

body = "<html><head><h2>Service Request</h2></head>" _
&"<body><strong>Request submitted by</strong>: " & Request.form("textfield5") _
&"</p><p><strong>PCT Service No:</strong> " &Request.Form("serviceNo") _
&"<p><strong>Site Name:</strong> " & Request.Form("siteName") _
& "</p><p><strong>Contact Number:</strong> " &Request.Form("textfield6") _
& "</p><p><strong>Works Type:</strong> " &Request.Form("option1") _
& "</p><p><strong>Title:</strong> " &Request.Form("serTitle") _
& "</p><p><strong>Floor:</strong> " &Request.Form("serFloor") _
& "</p><p><strong>Room No:</strong> " &Request.Form("serRoomNo") _
& "</p><p><strong>Description:</strong> " &Request.Form("desc2") _
&"</body></html>"

For the person reporting, site name, and contact number part, I want to pull this info straight from the database rather than from the form. Rather than using the request.form command to pull the info from the form, what code can I use to pull the info straight from my database?? Please help, have been trying to figure this out for ages!!
 
Back
Top