Ever want to send an automatically generated welcome email to a newly registered member upon the completion their

Well here is a simple example how to accomplish that task.

OK first all you have your registration form and the action page for that form where data is
inserted into the DB like this..

<!---This is the registrationACTION.cfm page,,,,arrived to by the registration.cfm page--->

<!---This form sends the user a welcome email that contains their Log-In credentials and a
email address they can use to contact someone for assistance--->

<!---Insert new user info in DB--->

<CFLOCK type="exclusive" timeout="10">
      <CFINSERT datasource="#REQUEST.DSN#" tablename="usesr">

<!---Now we use the <CFMAIL tag and some of the form info provided to create the welcome email that
sends the users log in credentials and sitmanager email info--->

<!---Now start the email, be sure to include the type="html" attribute so you can include html tags--->

<cfmail to="#FORM.Email#" from="#APPLICATION.MgrEmail#"
"Welcome to PhotoShare!!!" type="html">

<p align="center">
    Welcome to PhotoShare, a BlueFly DataDesign production.

<p align="center">
    Here is your user info<BR>

<div align="center">
      Email Address to log-in with:
   <span class=


<p align="center">
   Thanks again for joining our site and if you have any questions please contact me at:

<p align="center">
   <a href="mailto:SiteManager@blueflydatadesign.com">

<p align="center">
   <font size="-1" color="##FF0000">

        This email is sent automatically upon
        registering with our site. Please do not respond to this email.
        If you require assistance please
        click on or use the Site Manager address specified above.



<!---Now send them back to the home page so they can begin the experience as a member of your site--->

<cflocation url="index.cfm">

As you see above we use the FORM. variable created by submission of the user sign-up form.

Use the #FORM.Email# field as the "to" attribute of <CFMAIL>

Use the #FORM.Password# field from the submission form to insert into the email.

About This Tutorial
Author: Michael "Newkirk" MacDonald
Skill Level: Intermediate 
Platforms Tested: CFMX
Total Views: 76,318
Submission Date: December 28, 2004
Last Update Date: June 05, 2009
All Tutorials By This Autor: 5
Discuss This Tutorial
  • Nice and easy to understandscript

  • Not sure by what you mean when you say: "My picture. Please help me find my password to be able to sent this folder"

  • Please help me find my password to be able to sent this folder


Website Designed and Developed by Pablo Varando.