Title:
Cfexchagemail getAttachments does not work correctly with "/" in the attached filename
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Stefan Fritzsche / Stefan Fritzsche (Stefan Fritzsche)
Created: 05/07/2015
Components: CFExchange
Versions: 10.0
Failure Type: Unspecified
Found In Build/Fixed In Build: Final /
Priority/Frequency: Normal / Very few users will encounter
Locale/System: English / Win 2008 Server R2
Vote Count: 1
If you try to get attachments with cfexchangemail and the filename contains a "/", Coldfusion will throw an error. It interprets the filename as a directory which you can see in the error detail:
ERROR: coldfusion.tagext.net.exchange.ExchangeExceptions$ExchangeAttachmentIOException: Error reading or writing attachment.
ERROR TYPE: Application
ERROR MESSAGE: Error reading or writing attachment.
ERROR DETAIL: Attachment path = C:\ColdFusion10\tmp\XXXXXXX\X.PDF.
If you don't try to save the file and just request the attachment info, there will be no error. You are able to dump the response and it keeps the filename with "/".
<!--- build connection --->
<cfexchangeconnection action="open"
connection="myCon"
username="myUser"
password="myPass"
server="myServerIP"
formBasedAuthentication="true"
formbasedauthenticationURL="myAuthUrl"
serverVersion="2010"
protocol="https"
mailboxName="myInbox">
<!--- not working with files like "XXXXXXX/X.PDF? " --->
<cfexchangemail action="getAttachments"
name="attachementInfo"
connection = "myCon"
uid="mailUid"
attachmentPath="#GetTempDirectory()#"
generateUniqueFilenames="true" />
<!--- works fine --->
<!---
<cfexchangemail action="getAttachments"
name="attachementInfo"
connection = "myCon"
uid="mailUid" />
--->
<!--- close connection --->
<cfexchangeConnection action="close"
connection="myCon">
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3983155
External Customer Info:
External Company:
External Customer Name: Stefan
External Customer Email:
External Test Config: Windows 2008 R2, Exchange 2010 SP3
Attachments:
- May 11, 2015 00:00:00: 2_hf1000-3983155.jar
Comments: