There are many ways to do this. You can use
the FrontPage email bot, ASPMail,
ASPEmail, JMail or a CGI script that support SMTP servers.
Note: The servers do not support Sendmail.
Here is an example of a Cold Fusion mailto Script. The entries in
CAPITAL LETTERS are the ones you replace with your information.
Don't include the ---- lines.
-----Script Starts Here-----
<cfmail
from="USER@YOURDOMAIN.COM"
to="EMAIL@WHEREYOUWANTTHEMAILTOGO.COM"
subject="ENTER SUBJECT YOU WOULD LIKE TO APPEAR"
server=" THE IP OF THE WEB SERVER YOU ARE ON">
#form.FIRSTFORMFIELDNAME#
#form.SECONDFORMFIELDNAME#
#form.THIRDFORMFIELDNAME#
</cfmail>
<cflocation url="HTTP://WWW.YOURDOMAIN.COM/CONFIRMATIONPAGE.HTM">
------SCRIPT ENDS HERE----
The basics are pretty clear here. Just copy the text between the -----
lines and paste it into NOTEPAD. Do not use a word processor. This will
add extra formatting characters that the script will not recognize.
Enter the From Address, To Address and Subject. The body of the email
will be the #form.firstformfieldname# part. Let's say you have the
following form field names: email, firstname, lastname, address. The
body part would appear as:
#form.email#
#form.firstname#
#form.lastname#
#form.address#
You can also add extra info in the email like:
Thank you #form.firstname# #form.lastname# for submitting our form.
I see you're understanding the function here. The #form part inserts the
form field data that the customer entered in the form.
Once you've got the script edited to your liking, save the file as
mailto.cfm. Upload this anywhere in your website. The action= portion of
your form should read <form action="mailto.cfm"
method="post">
Make sure there are no spaces or dashes in your form field names.
|