> Hello,

> I would think this is an easy question, but I have not
> easily found the
> answer yet. Is it possible to send multiple attachments
> out with cfmail,
> and can the number of attachments and attachment names be
> dynamically
> determined based on user selections within the
> application. Basically Im
> wondering can 2 or 3 forms be sent out via cfmail for
> certain benefit
> selections an employee has made within our benefit
> selection system for our
> annual enrollment process. I found 1 site referencing
> cfmailparam.  Can I
> assume that the cfmailparam could be dynamically populated
> to pull the
> forms we needed.

> Thanks!
> Casey Cook

Absolutely ... here's some pseudocode

<cfquery name="rsSelected">
        SELECT benefits.FileName FROM benefits
        INNER JOIN employee_benefits ON
        ( employee_benefits.employeeid = #employeeid# )
</cfquery>

<cfset variables.sourcefolder = "c:\benefitsfiles">

<cfmail ...>
        <cfloop query="rsSelected">
                <cfmailparam file="#variables.sourcefolder#/#rsSelected.FileName#">
        </cfloop>
</cfmail>

s. isaac dealey                954-776-0046

new epoch                      http://www.turnkey.to

lead architect, tapestry cms   http://products.turnkey.to

certified advanced coldfusion 5 developer
http://www.macromedia.com/v1/handlers/index.cfm?ID=21816


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Reply via email to