I have been using a CFMAIL tag with a query results set.  I specify the TO field to be the var representing the column in the db containing the email address.  That works fine.

Now I want to create a testMode state for testing and want to change the TO field based on if I'm in TestMode or not.  

What I've tried...
* putting <CFIF> inside the CFMAIL tag
* putting a var inside the CFMAIL tag for the TO value and trying to cfset it prior to the CFMAIL tag but the problem is, in one case I want to send to a fixed address (mine) but still using the query list so therefore send myself multiple copies of the same email, one for each row in the query results set. In the other case I want to actually use the query var for the email address which is itself a var.  I've tried using #Evaluate(DE())# functions but no success.

I also want to limit the query to a smaller set of rows from the email list using MAXROWS parameter of CFMAIL tag. Again, tried using a var inside the CFQUERY tag like so:
<cfquery name="qGetAlertList" #maxrowsparam# datasource=#DSN_DB# dbtype="ODBC">
but it throws an error.

Any ideas on how to handle this?

CFCODER2
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to