Hi!
Thnx for the feedback! I give comments bellow:
>
> * SmtpClient::SendMultipartMail(MailMessage) [line 106] - boundary is a
> constant / hardcoded string. Ideally you should generate it dynamically.
> You may like to have a look at my implementation [1].
This was just a quick hack to get it working. First i thought of
using a hashcode. But i will gladly look at your implementation :)
> * [line 138] - While adding attachments, the Content-Type is
> "unknown/unknown". My opinion is that you should keep it as
> "application/octet-stream". I haven't seen MS implementation, but it's
> using CDOSYS - and IIRC, all unknown types are "a/o-s".
changed and commited now .. thnx :)
unknown/unknown was the only thing i knew/knew
>
> * SmtpStream::WriteBase64(Stream) [line 207] - IMO, you are looking for
> "if(row.Length == 60)". I am not sure what you are doing and why. If you
> are giving a break after 60 chars in mail, you should better do this:
>
> while(row.Length >= 60)
> {
> WriteLine(row.ToString().Substring(0, 60)); // unless there's short
> cut available for this
> row.Remove(0, 60);
> }
I add string ( length==3 ) on it each time so i know it will become 60 and
when it comes to 60 i write that line. when there is a final transform block
i just print the rest. This works ok.. but i have seen that the end of files
doesnt allways get as they should. I intend to lift this code out and make a
separate class for it together with a UUEncode class. Then i can test them
better and diff the result with the uuencode [--base64] command.
> * SmtpMail [line 20] - Why is the mail server static?
This is MS spec :( SmtpServer and Send should be static
> * SmtpMail - You should give default value to smtpServer = "localhost".
> This is what the MS docs read.
Yes thats right.. changed that in my first mail to the list with the source
code files but forgot to change it now that i got CVS .. will change it now
.. thnx :)
> * MailMessage - BodyEncoding, BodyFormat, Priority: All should have a
> default value. And while set-ing, you should check whether the value is a
> valid value using System.Enum.IsDefined(typeof(<enum>, value)) before
> assigning.
You are right here.. I have to fix this. I have only written:
SmtpStream,SmtpClient,SmtpException,SmtpResponse
so i have not had the time to look into the other classes yet. but i intend
to.
> Rest all looks pretty OK to me, at least now. Enjoy sending mails...
> :-)
Thnx... :) Nice mail.. it was helpful... if you find more stuff dont
hessitate to send a mail...
Best regards
Per
_______________________________________________
Mono-list maillist - [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list