Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

cfmail file attachements

Participant ,
Jan 15, 2009 Jan 15, 2009
I want to dynamically attach a document and send via cfmail.I use various queries to get the recipent names, and unique id info, then retrieve the document that corresponds.

One cfmail documentation says to use cfparam inside cfmail and specifiy the full path. Another says to use the mimeattach attribute with the full path.

This is where I am having the problem. My document name/variable from my query is #qryName.document#.
How do I set this up with the path, in either cfparam or mimeattach ?
354
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jan 15, 2009 Jan 15, 2009
I attached a brief snippet of code I use in an application that sends an XLS report to a group of recipients each night. Basically, a scheduled task runs, creates an XLS file with a dynamic name, stores it in a particular location on the server and then attaches it to the email.

Hope it helps!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 24, 2009 Jan 24, 2009
LATEST
I understand your code, but I still cannot seem to get the correct path.

I use this query to find th file that I want as an attachement to the cfmail :
<cfquery name="qryName" datasource="dbname">
select
uploadFileName
from tableName
where docNo = '#form.DocNo#'
</cfquery>

So the file that was uploaded with this docNo is stored in a variable named uploadFileName in the specifield table.

What is the full path that I would setup in cfmailparam so that this documant is an attachemetn in cfmail ?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources