Simple Mail FormsYou can create your own coldfusion script to send emails if you desire. For those of you who don’t want to go through the trouble, here’s a template you can use for your forms. Make sure to read the directions to set it up right. <form action="http://www.alumni.cornell.edu/cfxcgi/sendmail.cfm" method="post" name="your form name"> This is the tag that sends the form. It points to the sendmail script on our servers. You shouldn’t change this tag except the form name. You can name it whatever you want as long as the name contains no spaces. Naming the form isn’t required if you are not using Javascript to validate form fields. If you decide to use Javascript you need to name your form otherwise your script will not know which object your are talking about <input type="hidden" name="mail_confirmation_page" value="http://www.alumni.cornell.edu/orgs/classes/1942/test/confirmation.cfml"> This is a required hidden field form tag. Users won’t see any evidence of this tag unless they look at the source code. The only change you should make on this tag is the value attribute. This is the page you want to redirect users after they submit the form. It’s usually a thank you page and a link to a different section of your site. It’s always a good idea to give users a link on a thank you page, otherwise it’s a dead end for them. <input type="hidden" name="mail_to" value="receiving email goes here"> This one is pretty self explanatory. It is the "to" email field, in other words; to whom the form content will be sent to. The only change you should make here is to the to address inside the value atribute. <input type="hidden" name="mail_subject" value="testing Form"> Another self explanatory tag. It’s the email subject. Change the value attribute to whatever you'd like.
<input type="hidden" name="mail_from" value="from@address.com">
Below is a code example which will create a simple form with 6 input tags a submit and a reset button: <form action="http://www.alumni.cornell.edu/cfxcgi/sendmail.cfm" method="post" name="demoForm"> If you have these 4 required input fields your form should work fine. You can add as many fields as you’d like but all field names should start with mail_ . It doesn’t matter how many you have as long as they all start with mail_ your form will be submitted just fine. |
Control PanelAccess your website, update you contact information, change your password. Login now! Volunteer WebmastersThings to IncludeResources and Downloads
Images Templates Get HelpIf you are having difficulty with any of our services or tools, or if you are just plain stuck on something, please feel free to contact our office. We can help you with your HTML, CSS, and Coldfusion, and we may be able to help you get your audio, videos, images, and flash up and running as well. Send an email to Assistant Webmaster, Adam Palcich, at app35@cornell.edu. |