This project is read-only.

SMTP: Some keyboard characters not handled

Mar 4, 2013 at 3:59 PM
Edited Mar 4, 2013 at 4:19 PM
Hi Higty
Making mail tests I noticed that some important keyboard characters aren't handled, especially accented characters (àèéìòù), the Euro symbol (€), pound (£).
The SMTPMessage properties that I sets are "ContentEncoding" and "HeaderEncoding".
I have tested various codepages with different results, shown below.
I use a Italian system with CP-1252.
Any suggestions ?

P.s: To add that information using the System.Net.Mail library, using the default encoding, all characters are treated properly.

Mar 5, 2013 at 5:56 AM

Please try to set RequestEncoding property of SmtpClient class.
It may solve your problem.

Mar 5, 2013 at 10:57 AM

I solved but otherwise:

By setting the RequestEncoding property nothing has changed while setting ContentTransferEncoding and HeaderTransferEncoding properties of SmtpMessage from default HigLabo.Net TransferEncoding. SevenBit TO HigLabo.Net TransferEncoding. Base64 I have found the solution.

How codepage I used UTF-8 instead of my system default (ISO-8859-1) because this not handled the euro symbol.

Now, I look forward the implementation of "LinkedResource/AlternativeView" similar classes of System.Net.Mail for to inserting local images in HTML body ....

Good job