Message Attachment filename

0 votes
asked Jun 6, 2010 by Eddie (330 points)
edited Aug 10, 2010

Hi,

I would like to get the filename from a POP connection. It works fine. However, if the filename contains a '%', it uuencode to '%25'. How do I disable it?

e.g.

my filename is 'Sales forecast with 50 % market shares.doc'

string filename = message.Attachments[0].FilenName ;

The result is filename : 'Sales forecast with 50 %25 market shares.doc'

I am using c#.NET

Many thanks, Eddie

Applies to: Rebex Secure Mail

1 Answer

+1 vote
answered Jun 7, 2010 by Lukas Pokorny (103,050 points)
edited Jun 7, 2010
 
Best answer

This looks like a side-effect of a routine that "fixes" characters that are invalid for a filename. We will fix this issue in the next release. In the meantime, please use this instead:

string filename = message.Attachments[0].FileName.Replace("%25", "%");

Sorry for inconvenience, and thanks for letting us know about this!

commented Aug 17, 2010 by Eddie (330 points)
Thanks Lukas, no problem. We can work around that. Cheers
...