0 Replies Latest reply on Oct 30, 2007 8:06 AM by tim.clearview

    Renaming attachments on the fly with CFMAIL?

      One feature of our app allows our clients to send email to a specific contact with an attached PDF. This PDF is built from stitched together files in a previous step, so it has a dynamically-built filename.

      The filename consists of the subject, date, and some other info. We were adding a hash value to the end of the filename so we would have a unique value and avoid overwrites, but now it's setting off spam filters, and people aren't getting the email.

      I replaced the hash value with the timestamp, including milliseconds, which seems to work well enough to keep the file unique. This is fine for our database, but the boss wants the receipient to see a "friendly" version of the filename as their attachment. In other words, I need to strip out that other data (timestamp) when I send it.

      I thought there used to be a way to send attachments where you have the source file name and the destination file name... but apparently there isn't now, as far as I can see.

      Does anyone know how to do this? It seems like it would be a common issue. I know I could try to copy the file to the tempdirectory with a "Friendly" name, then send that as the attachment and delete it... but that seems excessive.