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

CFMail breaks up attachments filename with non ASCII

Guest
Sep 07, 2007 Sep 07, 2007

Copy link to clipboard

Copied

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()#"
file="#variables.attachments
.getFilename()#"
disposition="#this.dispositionType(variables.attachments .isInline())#"
contentID = "#variables.attachments
.getCid()#">

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.

Buergermeister
TOPICS
Advanced techniques

Views

411

Translate

Translate

Report

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
Guest
Sep 07, 2007 Sep 07, 2007

Copy link to clipboard

Copied

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)variables.attachments.getFilename()
3)this.dispositionType(variables.attachments.isInline())
4)variables.attachments.getCid()

jJ

Votes

Translate

Translate

Report

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
Guest
Sep 07, 2007 Sep 07, 2007

Copy link to clipboard

Copied

LATEST
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

Cheers!

Votes

Translate

Translate

Report

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
Documentation