I have my results of a form sent to E-mail. The problem is all the results are in one long column. Is there any way to fromat the results so they would look something like a text document with more than one field to a line.
This may be a little late. I cut and pasted and reduced some code from a form our service guys use so you may want to replace the "Session"(s) with a "Request.Form". This page was coming a page that takes form input data and places it into Session objects for later use (updating a database). The Email message page(included below)is in the middle of this sequence in case some parts need to be ordered asap. This example looks like a table on a web page with a border and cells side by side. Your page(s) will need to have an .asp extension.
<%
HTML = HTML & "<html>"
HTML = HTML & "<head>"
HTML = HTML & "<title>Email Message Page</title>"
HTML = HTML & "<style>"
HTML = HTML & "<!--"
HTML = HTML & "body, td { font-family:Verdana; font-size:9pt }"
HTML = HTML & "-->"
HTML = HTML & "</style>"
HTML = HTML & "</head>"
HTML = HTML & "<body>"
HTML = HTML & "<div align=""center"">"
HTML = HTML & "<table border=""1"" cellpadding=""4"" width=""90%"">"
HTML = HTML & "<tr>"
HTML = HTML & "<td width=""100%"" align=center colspan=""4""><b>" & "Company Information" & "</b></td>"
HTML = HTML & "</tr>"
HTML = HTML & "<tr>"
HTML = HTML & "<td width=""25%"">" & "Company Name:" & "</td>"
HTML = HTML & "<td width=""25%"">" & Session("cname") & "</td>"
HTML = HTML & "<td width=""25%"">" & "Company Address:" & "</td>"
HTML = HTML & "<td width=""25%"">" & Session("caddr") & "</td>"
HTML = HTML & "</tr>"
HTML = HTML & "<tr>"
HTML = HTML & "<td width=""25%"">" & "City:" & "</td>"
HTML = HTML & "<td width=""25%"">" & Session("city") & "</td>"
HTML = HTML & "<td width=""25%"">" & "State:" & "</td>"
HTML = HTML & "<td width=""25%"">" & Session("state") & "</td>"
HTML = HTML & "</tr>"
HTML = HTML & "</tr>"
HTML = HTML & "<td width=""50%"" colspan=""2"">" & "Remarks:" & "</td>"
HTML = HTML & "<td width=""50%"" colspan=""2"">" & Session("rmks") & "</td>"
HTML = HTML & "</tr>"
HTML = HTML & "</table></div>"
HTML = HTML & "</body>"
HTML = HTML & "</html>"
Dim MailObject
Set MailObject = Server.CreateObject("CDO.Message")
MailObject.From = "us@here.com"
MailObject.To = "someone@somewhere.com"
MailObject.Cc = "someone@somewhere.com"
MailObject.Subject = "Company Online Infomation"
MailObject.HTMLBody = HTML
MailObject.Send
Set MailObject = Nothing
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.