Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

does cfmail process sending files

Status
Not open for further replies.

olmos

Technical User
Oct 25, 2000
135
US

I need to send out email using a specific file for
each email. For example, I have 5 recipients each have a unique file
located on the server that needs to be included in the body of the email sent, not as an attachment. I have the recipient's email information in a database and can query this information. I also have the list of filenames in a file that need to match the recipient's name for each file that gets sent out.

How do I go about doing something like this ?

Thanks,
olmos

 
cfmailparam seems to add the file as an attachment, is there another way to put it in the email message instead .

and how can I loop over all the filenames to put each file with there respective recipient ?

thanks,
olmos.
 
Do it as a series if IF/ELSE statements. If each filename is associated with an email address then query the email and filename and enter the message in the body depending on the criteria.

EX:
Code:
<cfif email eq "email1@isp.com" and filename eq "file1">
  <cfmail from="" to="" subject="email1">#message#</cfmail>
<cfelseif email eq "email2@isp.com" and filename eq "file2">
  <cfmail from="" to="" subject="email2">#message#</cfmail>
<cfelseif email eq "email3@isp.com" and filename eq "file3">
  <cfmail from="" to="" subject="email3">#message#</cfmail>
</cfif>


____________________________________
Just Imagine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top