Login  
Search All Forums
Dart Home | PowerTCP Mail for .NET | Custom Development Reply | PowerTCP Mail for .NET Topics | Forums   
AuthorForum: PowerTCP Mail for .NET
Topic: windows-1250 content type name format exception
laurentbe

From: Anderlecht, Belgium
Posts: 30
Member Since: 10/21/03
posted November 10, 2016 4:01 AM

Hi,

I have an issue related to the Content-Disposition in Windows 1250 page format:

Content-Type: application/pdf; name="=?windows-1250?Q?last_page_=3D_filled_and_signed_-_Anna_Migda=B3.pdf?="
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="=?windows-1250?Q?last_page_=3D_filled_and_signed_-_Anna_Migda=B3.pdf?="

At the end of the filename there is a char '³' as seen in VisualStudio debugger: "attachment; filename="last page = filled and signed - Anna Migda³.pdf"

Mail.Net fails to get the Name because the underlying .Net function System.Net.Mime.QEncodedStream.DecodeBytes throws the following exception:

attachment.ContentType.Name
'attachment.ContentType.Name' threw an exception of type 'System.FormatException'
  Data: {System.Collections.ListDictionaryInternal}
  HResult: -2146233033
  Message: "Invalid hex digit '255'."

StackTrace:
at System.Net.Mime.QEncodedStream.DecodeBytes(Byte[] buffer, Int32 offset, Int32 count)\r\n 
at System.Net.Mime.MimeBasePart.DecodeHeaderValue(String value)\r\n 
at System.Net.Mime.ContentType.get_Name()\r\n 
at Dart.Mail.ContentType.get_Name()"

I have the original email at your disposal.
I test with version 4.3.3.0 .
Nick B (Admin)

From: Utica, NY USA
Posts: 619
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted November 10, 2016 4:08 PM

Hello,

Thank you for your offer, please send the email that demonstrates the issue into support@dart.com (as an attachment).
Reply | PowerTCP Mail for .NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX