Skip to main content
Participant
August 25, 2008
Question

CFMAILPARAM - Attachment Lossing Names

  • August 25, 2008
  • 1 reply
  • 380 views
Hi all,

Currently, I'm using CF7. When I attached a PDF inside a CFMAIL, the filename within the email became "ATT411668.dat", instead of "FileName.PDF".

1) I've removed all the non-alphanumeric characters.
2) I've truncated the filename to only 49 characters.

Assume #docname#.PDF exists.

Do you know why? Please advise. Thanks.

Best regards,
Aumaz Jang
This topic has been closed for replies.

1 reply

Inspiring
August 27, 2008
This will happen at the recipient's end depending on the mail server/client they use ... you could send a pdf from your desktop to the same recipient and it will happen with that too.

It could be a security reflex that it changes the file to a non-binary format if it is not trusted or seems to be coming from a questionable source.


A number of the government servers seem to do that - no idea why, but renaming the file at the recipient's end generally allows it to open properly.

Nothing you do in your code is going to change that.



*** If you are storing the file on the server, you may want to include a line in the message that gives them a URL if the attachment can not be viewed properly.