[Mono-list] More on System.Web.Mail

Miguel de Icaza miguel@ximian.com
26 Feb 2003 13:41:15 -0500


Hello,

> Summary of what is left :
> -------------------------------------------------------------------------------------------------------------
>      * Base64 encode subject >7bit
>      * E-mail address parsing
>      * UUEncoding
>      * Test cases and docs
> 
> Details:
> -------------------------------------------------------------------------------------------------------------
> The stuff that is left to do now is to encode the the Subject with Base64 like 
> MS does if the encoding is not 7bit/char in length. 
> Like this:
> 	=?iso-8859-1?B?VGVzdFNlbmRfMTEgW+Tk5ORd?=
> 
> This is not optimal because QP would probably be better for those who read 
> mail with telnet and POP3 :) but this is what .NET runtime does so we will do 
> it to, at least for now.

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.  

I guess some heuristics work in this case (I am CCing Jeff, which can
correct me):

	* If message body contains nulls, use base64 encoding.

	* If not, if the target server does not support  8-bit encoding
	  use Quoted Printable.

	* Else, use plain text transfer.


If so, and if you do not find any nulls on the input, you might want to
use 8-bit.