Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
sbufe #1
CFMAIL - Unicode filename for attachments
Hello again PaulH,
I am hoping you can give me some advice about this.
I have the charset attribute set to "utf-8". See attached code.
I've resolved my earlier issue about inserting (or replacing) text in the
unicode RTF doc, but the file name would be nice to have in Chinese as well.
Thanks,
Sierra
<CFMAIL TO="#FullName# <#Form.email#>"
FROM="Me <me@me.com>"
SUBJECT="Results for #Fullname#"
TYPE="HTML"
spoolEnable="no"
charset="#charset#">
<cfmailparam
file = "#new_file#"
type ="text/rtf"/>
sbufe Guest
-
Dynamically Including CFMAIL Attachments
Please help! I am wrting an app that uses CFMAIL, and need to dynamically attach files based on locations and filenames stored in a table. I... -
Adding Multiple Attachments to CFMAIL
Is there a way to add multiple mime files using <CFMAIL>? Here is the code I am using, but it doesn't work. When I comment out the second mime... -
2 attachments in CFMail
I think the summary says it all. Anyone know the syntax for this? Assuming it is possible of course :-) -
Adding attachments to cfmail
I have a form that allows a user to send an email to a list with the option of adding an attachment. The action page uploads the file, using cffile,... -
cfmail - Attribute validation error for tag CFMAIL.
I'm getting the error ' Attribute validation error for tag CFMAIL.' on the code below. All its doing is outputting a text string to the TO: field. ... -
PaulH #2
Re: CFMAIL - Unicode filename for attachments
while i haven't tried that w/RTF docs that technique certainly works w/other kinds of attachments. though it depends on the email client and i guess to some extent on their mail server.
PaulH Guest
-
sbufe #3
Re: CFMAIL - Unicode filename for attachments
Hi PaulH,
Still working on this. Please see attached snippet from the source of the
email, with attachment.
This is what happens if I send it out using utf-8 everywhere that I can put
it, but without doing anything to the chinese file name (like URLEncodedFormat).
Sierra
Pertinent CF Source:
<cfset FullName = udata.NameLast & udata.NameFirst>
<cfset file_name = "Print_Description_#FullName#.rtf">
<!--- Where do I temporarily stick the new file? --->
<cfset new_file = "#docs_path#outfile\#file_name#">
<CFFILE ACTION="Write" FILE="#new_file#" OUTPUT="#rtf#" charset="utf-8"
nameconflict="overwrite">
<!--- Send Email w Attachment --->
<CFMAIL TO="#emailaddress#"
FROM="Print Survey Results <surveyresults@printsurvey.com>"
SUBJECT="Results for #FullName#"
TYPE="HTML"
TIMEOUT="30"
spoolEnable="no"
charset="utf-8">
<cfmailparam
file="#new_file#"
type="text/rtf; charset=utf-8">
Email Source:
Content-Type: text/rtf; charset=utf-8
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0*=utf-8''Print_Description_PAUL%20732%20;
filename*1*=%e4%bf%97%e8%af%ad%e8%af%b4;
filename*2=.rtf
sbufe Guest
-
sbufe #4
Re: CFMAIL - Unicode filename for attachments
It arrives in my GMail with this file name:
utf-8''Print_Description_PAUL%20732%20
It is not recognized as a RTF doc, because only the first line of the source
filename is read, and it doesn't have an extension anymore.
Sierra
sbufe Guest
-
sbufe #5
Re: CFMAIL - Unicode filename for attachments
Here is a sample of email source that DOES display Chinese chars in my GMail.
Sierra
Content-Type: text/plain;
name="=?gb2312?B?1tDOxMP7s8YudHh0?="
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="=?gb2312?B?1tDOxMP7s8YudHh0?="
sbufe Guest
-
sbufe #6
Re: CFMAIL - Unicode filename for attachments
When I use the name in the "type" attribute, and escape out the quotes to make
it match the previous email source sample, it comes through as that Chinese
file name, something-or-other.txt.
See attached CF code.
So, I wonder how I can manipulate that attribute to become what I need? I
don't even see ".txt" legible in it.
Sierra
<cfmailparam
file="#new_file#"
type="text/rtf; name=""=?gb2312?B?1tDOxMP7s8YudHh0?=""">
sbufe Guest
-
PaulH #7
Re: CFMAIL - Unicode filename for attachments
not sure if that's an issue w/rtf files (i just tested again w/.txt, .doc files
using thai/arabic language names & these worked just fine) or something else
(that something else being your email client, what you say works is using
gb2312 not utf-8). if i get a chance i'll look into this some more over the
weekend.
PaulH Guest



Reply With Quote

