What about this:

<cfloop index="i" From="0" to="#Getmail.RecordCount#">

<cfif i>
<cfset MailTo= GetMail.Student[i]>
<cfelse>
<cfset MailTo= "MyEmailAddress">
</cfif>

<cfmail
To="#MailTo#"
Blah Blah
</cfmail>
</cfloop>

Now your query stays in the original state and the
cfif clarifies what youre doing.




>I just prefer not having the two calls, since the objective is to receive
>what your recipients receive, and any changes to the one cfmail must also be
>made to the other cfmail. By simply adding your email to the recordset you
>ensure that you only have one place to make changes.
>
>I recognize that a variable is likely to be used for email body and subject,
>but I'm also thinking about such changes as adding enctype, attachments,
>setting type to html, having alternate email methods, etc.
>
>There's nothing inherently wrong with two email calls, I just like to think
>ahead as far as reasonable and if the solution doesn't call for significant
>extra work, then planning for some eventualities can be helpful during the
>70% of the application's lifecycle that constitutes the maintenance phase...
>
>-----Original Message-----
>From: Tangorre, Michael [mailto:[EMAIL PROTECTED] 
>Sent: Friday, January 14, 2005 1:31 PM
>To: CF-Talk
>Subject: RE: CFmail and receiving 1 copy
>
>> From: Calvin Ward [mailto:[EMAIL PROTECTED] 
>
>> The other solutions aren't as ideal for various reasons, in 
>> my opinion.
>
>What si wrong with the two cfmail tag calls? 1 call passing in the query
>and 1 call to the 1 recipient?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190746
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to