[Mono-list] More on System.Web.Mail
Wed, 26 Feb 2003 20:46:55 +0100
| You should delay the encoding until you actually have to deliver the
| content. Once you connect to the SMTP server, you can find out whether
| it supports eight-bit transfers.
As i have understood it the SMTP spec says 7bit. And since the mail
goes through several MTA's and it would be hard to know what each
of them could handle. And MS only uses 7bit content transfer for us-asc=
otherwise it uses 8bit and encodes the subject with base64
| guess some heuristics work in this case (I am CCing Jeff, which can
| correct me):
| =09* If message body contains nulls, use base64 encoding.
| =09* If not, if the target server does not support 8-bit encoding
| =09 use Quoted Printable.
| =09* Else, use plain text transfer.
The code that is on the CVS reacts exactly as the .NET runtime on some =20
different encodings. I could write a library that handles everything with=
encoding better than .NETruntime but then it would not be compatible. But=
thats not for me to decide. If you want me to write a better one but not=20
compatible i can do so. The api would be the same but the resulting mail=20
would differ. Either way is ok with me :)