2 Replies Latest reply on Sep 7, 2007 11:51 AM by Buergermeister

    CFMail breaks up attachments filename with non ASCII

      Hi CF-Devs out there!

      My problem is, that when attaching files via cfmailparam - no matter if inline or not - and using a filename that contains or a non 7bit-ASCII character or a simple space, the filename is not displayed correctly in Outlook nor Thunderbird. I am sure that this topic has been discussed here earlier but I really don't find any topic when using the Forum Search function... so please help anyway :) I am still using CFMX 6.1 :(

      My code is the following:
      <cfmailparam type="#variables.attachments .getContentType()#"
      disposition="#this.dispositionType(variables.attachments .isInline())#"
      contentID = "#variables.attachments

      When I revise the generated email code then I find the following:
      Content-Type: application/octet-stream
      Content-Transfer-Encoding: base64
      Content-Disposition: attachment; filename*2=nger.csv; filename*0*=UTF-8''emailempf; filename*1*=%c3%a4
      Content-ID: <DEE13419-D022-9396-C8A4DF2AAAA7C4EF>

      You can see that the filename (emailempfänger.csv) breaks up into several pieces which according to
      RFC 2231 is a valid format but obviously is not interpreted correctly by e.g. Outlook. Or am I missing something else?

      I would appreciate your help. Thanks in advance.

        • 1. Re: CFMail breaks up attachments filename with non ASCII
          jjonney Level 1
          I tried the following and it worked for me:
          <cfmailparam file="C:\Detail.xls" type="text" >
          in cfmail tag.
          Please send the optional values that you are using for the following
          1) variables.attachments.getContentType()

          • 2. Re: CFMail breaks up attachments filename with non ASCII
            Buergermeister Level 1
            The filename you used does not contain any non 7bit ASCII character. The problem only occurs if I use characters like "ä","ö","ü" but even [space] does provoke the error.

            The variables hold the following values (you can see them in the source posted, too):
            1) variables.attachments.getContentType() : application/octet-stream
            2) variables.attachments.getFilename() : [AbsoluteFilePath]/emailempfänger.csv
            3) this.dispositionType(variables.attachments.isInline()) : attachment
            4) variables.attachments.getCid(): DEE13419-D022-9396-C8A4DF2AAAA7C4EF