System.Web.Mail and Internationalization

After several days of troubleshooting and head-banging, I discovered (unearthed) a shortcoming of System.Web.Mail that I would like to pass along to the readers.

System.Web.Mail is a wrapper over CDONTS and CDOSYS depending on the version of Windows that the .NET Framework is installed on. This is important to remember, because even though you may be using the same framework, you will see different results depending on the underlying OS.

If you are running .NET v1.1 on a Windows Server 2003 host, and sending HTML mail, then you will notice that the Transfer-Encoding value is 7-bit. (This is defined in the MIME standard) On Windows 2000, the transfer-encoding is iso-8859-1 (or quoted-printable). The problem being that 7-bit does not transfer line breaks.

You may start receiving “line too long errors” from certain mail server/spam filter combinations if you have a long HTML email message that does not line-break every 60 characters or so.

There is no way in .NET v1.1 to change the transfer-encoding value. You are stuck. Your possible workarounds are:

* Use COM Interop and write your email using CDO. example
* Write your own SMTP component.
* Buy a third party emailing component.

Leave a Reply

Name *
Email *