Using Coldfusion to send email with multiple attachments

Good afternoon, I was hoping I could get some help. I am trying to send email with attachments with ColdFusion. It would be multiple attachments based on files in a folder. Those files are uploaded during a submission of a form, and that part works well but I'm getting an error whenever I try to attach those files to an email with the cfmail parameter. Below is just some test code:

<CFDIRECTORY NAME="myfiles1"
  DIRECTORY="f:\Websites\MCA\MCA\TempUpload\"
  FILTER="*.*"
  SORT="DateLastModified DESC">

and then my email code is:

<CFPROCESSINGDIRECTIVE SUPPRESSWHITESPACE="No">
<cfmail query="MCALeads"
SUBJECT="!!! HIGH PRIORITY !!! APPROVAL"
FROM="hft@mail.com"
TO="hft@mail.com"
CC="hft@mail.com"
BCC="hft@mail.com">
      
<cfloop query="myfiles1">
<cfmailparam file="#myfiles1.name#">
</cfloop>

-------------------------------------------------------------------------------
STATUS: APPROVED !!! THIS IS A HIGH PRIORITY ACTION !!!

Budget Office,

Please prepare

</cfmail></CFPROCESSINGDIRECTIVE>

I get an error message through the ColdFusion log:
Message: The resource 2292-GSAFEDSIMMIPRInstructions.doc was not found. The root cause was: ''. <br>The error occurred on line 57. | Referer: | Template: /mcadev/emailtest.cfm

I thought maybe ColdFusion wasn't seeing the files, but I renamed the file, and it sees the renaming in the error message so I am at a loss. Any help would be greatly appreciated!!
diecasthft01Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gdemariaCommented:
Does name contain the full path to the file?   I was thinking it was only the name of the file, if true, that would not tell CFMAIL where the file is located...

myfiles1.name

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
diecasthft01Author Commented:
YES!!!! That was it.....so I see what it was looking for now. I completely missed that. Thanks a lot!!!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ColdFusion Language

From novice to tech pro — start learning today.