Sure -- bottom part of action page CFM that sends email after a table 
update -- the email can contain anything you want including form variables 
formatted as you desire -- all this one does is say a posting was made and 
what for...

<HEAD>
  <TITLE>Shipment Record Update Page</TITLE>
  <META HTTP-EQUIV="REFRESH" CONTENT="2.0;URL=SHP_LST.CFM">
</HEAD>

<CFSET FORM.EDIT_DT = 
UCase(DateFormat(CreateODBCDateTime(now()),"mm/dd/yy"))
 
                     UCase(TimeFormat(CreateODBCDateTime(now()),"(HH:mm)  
"))>

<CFSET FORM.ID = "11">
<CFSET FORM.TO_USG = "Y">
<CFSET mTO_USG = "Y">

<CFQUERY NAME="SHP_UP" DATASOURCE="COLAB2">
  UPDATE SHIP
  SET
  ID         = '#FORM.ID#'           ,
  REF_NUM    = '#mREF_NUM#'          ,
  LIC_TYPE   = '#CLIENT.mLIC_TYPE#'  ,
  LIC_NUMBR  = '#CLIENT.mLIC_NUMBR#' ,
  SHIP_DATE  = '#FORM.SHIP_DATE#'    ,
  PORT       = '#FORM.PORT#'         ,
  SHP_QTY    = '#FORM.SHP_QTY#'      ,
  SHP_VALUE  = '#FORM.SHP_VALUE#'    ,
  SHIPMENT_N = '#FORM.SHIPMENT_N#'   ,
  COMMODDESC = '#FORM.COMMODDESC#'   ,
  COUNTRY    = '#FORM.COUNTRY#'      ,
  ENDUSER    = '#FORM.ENDUSER#'      ,
  IN         = '#FORM.IN#'           ,
  OUT        = '#FORM.OUT#'          ,
  CASE_NUM   = '#FORM.CASE_NUM#'     ,
  CTRK_NUM   = '#FORM.CTRK_NUM#'     ,
  SCTRK_NUM  = '#FORM.SCTRK_NUM#'    ,
  FN_CTRY    = '#FORM.FN_CTRY#'      ,
  SRVC_DUR   = '#FORM.SRVC_DUR#'     ,
  SRVC_DESC1 = '#FORM.SRVC_DESC1#'   ,
  SRVC_DESC2 = '#FORM.SRVC_DESC2#'   ,
  SRVC_DESC3 = '#FORM.SRVC_DESC3#'   ,
  SRVC_DESC4 = '#FORM.SRVC_DESC4#'   ,
  SRVC_DESC5 = '#FORM.SRVC_DESC5#'   ,
  PREP_DT    = '#FORM.PREP_DT#'      ,
  PREP_WHO   = '#FORM.PREP_WHO#'     ,
  EDIT_DT    = '#FORM.EDIT_DT#'      ,
  EDIT_WHO   = '#CLIENT.USER_ID#'    ,
  DRAFT_NUM  = '#CLIENT.mDRAFT_NUM#' ,
  DIV_NUM    = '#CLIENT.mDIV_NUM#'   ,
  TO_USG     = '#mTO_USG#'
  WHERE REF_NUM = '#CLIENT.mREF_NUM#'
</CFQUERY>

<BODY>
  <CENTER>
    <br>
    <table width="670" border="5" cellspacing="5" cellpadding="5">
    <tr>
    <td>
    <div align="center">

  <CFOUTPUT>
    <font color="brown" size="4">
    <b>Updated Shipment Against License Number #CLIENT.mLIC_NUMBR#
    <BR>Advisory Email also sent to WASHOPS
    <font color="brown" size="3">
    <BR>Returning to Shipments List
    </b></font>
  </CFOUTPUT>

  <CFMAIL TO = "[EMAIL PROTECTED]"
        FROM = "#CLIENT.EMAIL#"
     SUBJECT = "Shipment Posted by #CLIENT.USER_NAME#">
I posted Shipment Against (#CLIENT.mLIC_NUNBR#) as of #FORM.L_EDIT_DT#:

#CLIENT.USER_NAME#
               </CFMAIL>
    </div>
    </td>
    </tr>
    </table>
    <br>
    <hr size="2" color="Brown" width = "670">
    <br>
    <CFFORM NAME="SHP_UP" ACTION="SHP_LST.CFM">
     <INPUT TYPE="button" VALUE="Shipments List"
         onClick="location.href='SHP_LST.CFM'">
    </CFFORM>

  </CENTER>
</BODY>

</CFIF>

</HTML>

     ^
    / \__
   (    @\___
  /          O
 /    (_____/
/_____/
Whoof...
410-757-3487

-----Original Message-----
From:   Jones, Becky [SMTP:[EMAIL PROTECTED]]
Sent:   Monday, March 05, 2001 12:04 PM
To:     CF-Talk
Subject:        email

is there a way to have a form that when a user types in data, it gets
submitted to a database and an email of the data goes to a specific person
or persons?
thanks,
bec.


*************************************************
This e-mail, including any attachments, is intended for the
receipt and use by the intended addressee(s), and may contain
confidential and privileged information.  If you are not an intended
recipient of this e-mail, you are hereby notified that any unauthorized
use or distribution of this e-mail is strictly prohibited.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to