[Mono-list] CS-Mail-API
Dwivedi , Ajay Kumar
AjayKumar.Dwivedi@dresdner-bank.com
Wed, 3 Jul 2002 13:29:11 +0100
> What's an InternetAddress? Anyways, that's not my biggest concern -
> which is that the classes don't seem to address addresses like:
>
> MONO: miguel@ximian.com, mono-list@ximian.com;
This can be taken care of by using an Alias Class which extends
EmailAddressList. The Alias class will contain one additional property
AliasName.
In fact the Alias is a Email client's burden and I am not sure if
the
mail API even needs it, since all aliases are expanded before sending
the mail.
> <enum name="MessageFlags">
> </enum>
>
> This shouldn't be an enum since you can theoretically have more than a
> single flag marked. For example, a message could be Seen and Answered.
> We use a bit field in Camel to handle this.
This can be handled by enum in C#. You need to add the Flags
Attribute to the enum and make sure the enum values have a single bit set.
Eg None=0, Seen=1, Answered=2, New=4...
> Actually I'm not convinced that csMail should even worry
> about sorting. This can be done at a higher level.
Quite True. Its the burden of the Mail client.
> A message's flags are really just metadata and not really part of the
> message at all. Or at least that's my paradign.
> Message::IsExpunged() sorta follows the same idea...why do we
> need this?
> If we have an instance of the message, do we really care? I dunno,
> perhaps it could be useful.
It can be useful. Imagine an IMAP folder with some messages
in it. The client Gets A list of messages from the folder, marks
some of them as deleted and asks the API to save them. The methods
like ISExpunded can help in finding out if the message instance
has been deleted by the user and show appropriate label/image.
Only when you save the folder, is the message deleted from the
server. Now this saving can be automatic or user initiated.
For example pine deletes messages from the local spool only when
user exists and not when he marks them as deleted.
Happy Hacking,
Ajay