navigation
Thomas Brunt's OutFront Hosting
 
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Microsoft MVP
 

Spooky's Databases > Advanced Tips > Sending E-Mail Confirmation

When using a form to submit to database, there are not many options when it comes to "Confirmations"
This method will demonstrate sending an E-Mail to you as a confirmation that a submission has been made.
It assumes you have some sort of E-Mail component installed on your server (hence it cannot be tested locally on PWS) 


  • Open the file "fpdbform.inc" (which is in the hidden directory "_fpclass")
  • You need to locate the function "Function FP_FormConfirmation"  which is on about line 52.
  • This function is used for the "generic" confirmation when a database submission is made.
  • Between these two  lines :

Function FP_FormConfirmation(szCharset, szTitle, szmsg1, szUrl, szMsg2)
Response.Write "<html>" & vbCrLf

  • You will add a generic CDO for NTS Email script.
    (Note, that you can use any ASP email script, it depends what your server has installed)

Function FP_FormConfirmation(szCharset, szTitle, szmsg1, szUrl, szMsg2)

sFrom = Whoever
sTo = "YourEmailAddress"
sSubject = szTitle
sBody = "Your body text"

Set myCDONTSMail= CreateObject("CDONTS.NewMail")
myCDONTSMail.BodyFormat= 1
MyCDONTSMail.MailFormat= 0
myCDONTSMail.Importance= 2
myCDONTSMail.Send sFrom, sTo, sSubject, sBody
Set myCdontsMail= Nothing

Response.Write "<html>" & vbCrLf

  • The "s" variables can be modified to suit, or can contain requests for form or hidden contents from the submission form

NOTE!
Any modifications to this file are global! ALL database submission forms within your application will use the same settings.
Any changes made by you, will be overwritten the next time you modify a Database Region Wizard or republish, so keep a copy of your new file!!

As usual, you test at your own risk!

Here's What Microsoft have to say about it, and (not surprisingly) they don't use the DRW to achieve it!
http://support.microsoft.com/support/kb/articles/q275/2/51.ASP

Here's another option also!
http://www.frontpagehowto.com/dbandemail.htm


Microsoft Corporation in no way endorses or is affiliated with "OutFront." 
OutFront is published and edited by Thomas Brunt
440 Great Circle Dr., St. Matthews, SC 29135.  803-655-6151
© 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 All Rights Reserved
Click here to view our privacy statement.