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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autoresponse email from a form submit

Status
Not open for further replies.

maverik59

Programmer
Oct 30, 2002
67
GB
Hi I have a form for with the following values- venue,date, time.
Is it possible to send an autoresponse confirmation mail to the submitter? These values to get stored in a database table. I have absolutely no idea. Otherwise i will do it manually.

Any help much appreciated.
 
Hi mate,

You do this the same as sending mail to yourself, but you take the e-mail submitted and send the mail to that.

Code:
<CFMAIL FROM=&quot;you@yourdomain.com&quot; TO=&quot;#form.email#&quot; SUBJECT=&quot;Your Enquiry&quot; TYPE=&quot;html&quot; SERVER=&quot;smtp.yourdomain.com&quot; PORT=&quot;25&quot;>

This is the body here.

</CFMAIL>

Hope this helps
Wullie


The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
Oooh I see Cheers mate this could save so much time. In the CFMAIL Body then I simply can call an SQL query to relay back to them all the data they used?cheers

 
Hi mate,

You can set-up the script to process the data as it is submitted and it will take the form input rather than needing a db query.

Just add #form.venue# #form.date# etc etc to the body.

Hope this helps Wullie


The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
Sorry I mis understood instead of requerying the data they send, the body is where the input the data? -- Is it possible for the send button to send a confirmation email as well as update the database?
Cheers m8

 
Hi mate,

Do your database insert as normal, then just after it, add the mail code above.

Assuming that the data you are sending them in this response is all contained in the previously submitted form, you simply need to use #form.field_name# to bring in the values from the form rather than adding the info to the database and then extracting it again.

Hope this helps Wullie


The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
Thanks so much mate I will use this now, so much easier Cheers!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top