Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I Control the Look of Form Output?

Status
Not open for further replies.

dharmachic

Technical User
Dec 18, 2000
24
0
0
US
Hi all,

I was wondering if it was possible to control the way form results appear in my emailbox. When people fill out my form, I receive a very raw file that lists all field names regardless of whether or not they were filled in. I would like to be able to control the look & layout if possible. I'm using a bnb.cgi form (Big Nose Bird)

Can anyone help?

Thanks :)
 
Does your web-server use CDONTS or have the capability of using CDONTS to send mail?

If so, ditch the Big Nose Bird CGI script and try this -->

mailto = request.form("form_field_email")
varname = request.form("form_field_name")
varusername = request.form("form_field_username")
varcontribution = request.form("form_field_contribution")

Dim MyMail
Set MyMail = Server.CreateObject("CDONTS.NewMail")


MyMail.To = mailto
MyMail.From = "you@yourwickedsite.com"
MyMail.Subject = "Form Submission Received"
MyMail.Body = "Thanks " & varname & ". Your request has been received." & vbcrlf & vbcrlf & "This is just to let you know we got your request. Processing will take a day or so." & vbcrlf & vbcrlf & "We have you down as " & varusername & "@yourwickedsite.com. Great choice." & vbcrlf & vbcrlf & "This is an automated response."

MyMail.Send
Set MyMail = Nothing

I use this script on my site to process requests for free email accounts. If you want to send an email to yourself, just modify the script so that MyMail.To = "youremailaddress@host.com".

Then modify the body of the message accordingly. You can format the email however you want. The nice thing about this is that you can kill two birds with one simple stone. You can email the submitter and confirm that the request was received, then you can email the form contents to yourself in a nice little format.

Need more help with CDONTS, go to the ASP forum and search within it for CDONTS.
 
Thanks Jables,

I've been scratching my head for a while trying to get a snippet of code that would lead the way for me to save the emails sent into a db, this paves the way.

Good on you!

Have Fun.

M
 
Good idea. I haven't even thought to do that, but it would be useful.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top