Taking the long way 'round I suspect... This code requires only a single
<cfmail> tag and accomplishes what you're looking for. When you want to
change the frequency of the link, just change the "mod" value to the 1 in X
value you want, like 7 or whatever... i.e. <cfif getcall.currentrow mod 7 eq
0>

<cfmail query = "GetCall" to="#NewEmail#" from="[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> "
         subject="Closed Help Desk Ticket"
         type="HTML">

<body>
Your Help Desk call (Ticket No. #GetCall.ID#) has been
closed.  If you believe the call should not be closed, or
the problem occurs again, please reply to this message
or call the Help Desk, to let us know.

<p><H3 align="center">Call Information</h3>
<h4><b><font color="Red">Ticket Number:</font></b>
#GetCall.ID#<P>

<b><font color="Red">Problem Description:</font></b>  <BR>
#GetCall.Issue#<P>

<b><font color="Red">Resolution:</font></b> <BR>
#GetCall.Resolution#<br>
#counter#<br>

<cfif GetCall.CurrentRow mod 2 eq 0>
<div><font color="Red"></font><a href="HDSurvey.cfm">
Click here to answer a brief survey about your issue and
resolution.</a></font></div>

</body>

</cfmail>


hth

Isaac
Certified Advanced ColdFusion 5 Developer

www.turnkey.to
954-776-0046


> I need some help. I am trying to devise a way where every
> 2nd (eventually
> will be 7th) email sent out has a link in it that the
> users can click on
> that takes them to a survey that we would like for them to
> participate in.
> My logic so far is this:

> 1. I have a <cfset counter  = 0> in the application.cfm.

> 2. Then in the page where the tech clicks to close the
> ticket, before they
> click on the submit button to go to the page that
> processes the sending of
> email, I have:
> <cfset counter = counter + 1>

> 3. Then this is what I have on my page for sending out the
> email:

> <cfif counter LESS THAN 2>
> <cfmail query = "GetCall" to="#NewEmail#" from=" aclark
> <mailto:[EMAIL PROTECTED]> @stinsonmoheck.com"
>         subject="Closed Help Desk Ticket"
>         type="HTML"><body>
>   Your Help Desk call (Ticket No. #GetCall.ID#) has been
>   closed.  If you
> believe the call should not be closed, or the problem
> occurs again, please
> reply to this message or call the Help Desk, to let us
> know.
> <P>
> <div align="center"><H3>Call Information</h3></div><P>
> <h4><b><font color="Red">Ticket Number:</font></b>
> #GetCall.ID#<P>
> <b><font color="Red">Problem Description:</font></b>  <BR>
> #GetCall.Issue#<P>
> <b><font color="Red">Resolution:</font></b> <BR>
> #GetCall.Resolution#<br>
> #counter#
> <P></h4></body>
> </cfmail>

> <cfelseif counter EQ 2>
>  <cfset counter = 0>
> <cfmail query = "GetCall" to="#NewEmail#" from="
> [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]> "
>         subject="Closed Help Desk Ticket"
>         type="HTML"><body>
>   Your Help Desk call (Ticket No. #GetCall.ID#) has been
>   closed.  If you
> believe the call should not be closed, or the problem
> occurs again, please
> reply to this message or call the Help Desk, to let us
> know.
> <P>
> <div align="center"><H3>Call Information</h3></div><P>
> <h4><b><font color="Red">Ticket Number:</font></b>
> #GetCall.ID#<P>
> <b><font color="Red">Problem Description:</font></b>  <BR>
> #GetCall.Issue#<P>
> <b><font color="Red">Resolution:</font></b> <BR>
> #GetCall.Resolution#<br>
> #counter#<br>
> <div><font color="Red"></font><a href="HDSurvey.cfm">Click
> here to answer a
> brief survey about your issue and
> resolution.</a></font></div>
> </cfmail>
> </cfif>
> </cfif>

> The probelm I am having right now is that it sends out
> duplicates of emails
> to the tech and the user. It is also not incrementing the
> counter.

> Can anyone help me figure out what is wrong with this?

> Thank you,

> Aimee Clark
> Web Developer
> Stinson Morrison Hecker LLP
> 816-691-3461
> [EMAIL PROTECTED]

> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~~~~~~~~~~|
> Archives:
> http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
> Subscription: http://www.houseoffusion.com/index.cfm?sideb
> ar=lists&body=lists/cf_talk
> FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
> Get the mailserver that powers this list at
> http://www.coolfusion.com


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

Reply via email to