Customizing email output

C

crash8

I have a web site that utilizes a form to allow customers
to request information. When they click submit, the form
sends me an email, but rather than getting just a raw
listing of the fields in the form, I would like to format
the output so the email gives me the information in a
neat, intelligible manner. Does anyone know how I can do
this?

Also, I have several checkboxes in the form. Is there any
way to list the output of the checkboxes ONLY if they're
checked without having to list the unchecked ones?

Any input would be greatly appreciated. Thanks!
 
J

Jim Buyens

You would have to program this in ASP or ASP.NET. Here's a
simple example using ASP:

<body>
<form method="POST">
<input type="text" name="txtBody" size="20"><p>
<input type="submit" value="Submit" name="btnSub"></p>
</form>
<%
Const cdoSchema = _
"http://schemas.microsoft.com/cdo/configuration/"
if request("btnSub") <> "" then
Set objMsg = CreateObject("CDO.Message")
objMsg.Subject = "Test " & now()
objMsg.Sender = "[email protected]"
objMsg.To = "[email protected]"
objMsg.TextBody = "The text box said, """ & _
request("txtBody") & """."
objMsg.Configuration.Fields.Item(cdoSchema & _
"sendusing") = 2
objMsg.Configuration.Fields.Item(cdoSchema & _
"smtpserver") = "snmp.crash8.com"
objMsg.Configuration.Fields.Item(cdoSchema & _
"smtpserverport") = 25
objMsg.Configuration.Fields.Update
objMsg.Send
end if
%>
</body>

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
Top