Welcome to Dream.In.Code
Getting Help is Easy!

Join 109,297 Programmers for FREE! Ask your question and get quick answers from experts. There are 1,224 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



Sending an email through a CFIF statement

 
Reply to this topicStart new topic

Sending an email through a CFIF statement

dallasmcintosh
post 8 May, 2008 - 11:57 AM
Post #1


New D.I.C Head

*
Joined: 29 Apr, 2008
Posts: 3


My Contributions


Hi,

I want to be able to send an email to the customer saying that their order has been dispatched when we click the checkbox and the date has been set.

I have included the code for the checkbox, which when clicked and saved will make...

CODE

<tr bgcolor=ffffff>
   <TD nowrap><strong>#itemcode#</strong></TD>
   <td width=100%>#itemname# - #itemdescription#</td>
   <td><input type="checkbox" name="SEND_#itemoptionid#" value="1"<cfif itemsentdate NEQ ""> checked<!--- <cfelseif DateCompare(Now(),itemdue) EQ 1> checked --->
   </cfif>
   </td>
</tr>


This appear on our page:

CODE

<TR bgcolor=e2e2e2>
   <TD><B>Order Dispatched*:</TD>
   <TD bgcolor=ffffff>
   <input type="hidden" name="ordersentdate" value="#ordersentdate#">
<cfif ordersentdate neq "">
   <font size="2">on #dateFormat(ordersentdate,'dddd, dd mmmm yyyy')# @ #TimeFormat(ordersentdate,'h:mm tt')#</font>
<cfelse>
   Not Yet Dispatched
</cfif>
   </TD>
</TR>


So from their we want to have an email sent to say what we see on our page, plus a few other things that we can specify in a html email.

Please help!!!
User is offlineProfile CardPM

Go to the top of the page


rickdrew
post 11 May, 2008 - 11:23 AM
Post #2


New D.I.C Head

*
Joined: 10 May, 2008
Posts: 6


My Contributions


All you need is a simple form action that tests if the check box is ckecked , something like -

if checked
run a query to get the info you need
cfmail query
output

close all the tags

The page with the check box and date would have a form submit button.

If you want it done the moment the box is checked, and not on a button press, you still need the form action, but would have to handle the execution with javascript. A button is much easier.

Rick Drew
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 9/6/08 09:46AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month