RE: Retrieving priority information from messages

On Tue, 2007-04-10 at 12:13 +0300, Dirk-Jan Binnema nokia com wrote:

> >Just set the X-Priority header in the top level MIME part and don't
> >(yet) care to much about those SMTP servers.
> And, I would guess, the X-MS-Priority as well; unfortunately,
> these two priorities with overlapping if not identical semantics
> are both in use. It's not clear which one should be used if
> a message had both, but differed in priority...

The X-Priority. Merging by taking the average of the two sounds a bit
silly to me ;-)

> reading:
> 	if exists (X-Priority)
> 		prio = val (X-Priority)
> 	else if exists (X-MS-Priority)
> 		prio = val (X-MS-Priority)
> 	else
> 		prio = PRIO_NORMAL
> writing:
> 	set_val (X-Priority, prio);
> 	set val (X-MS-Priority, prio);
> Of course, the "val/set_val" function is a bit different
> for both priorities, but hey, it's pseudocode.
> Would Tinymail not be the place where to put the above logic?
> Every tinymail-using client would probably do something like
> this.

Yes, tinymail is the place where to put this logic. Especially the
reading part of it. Right now is the reading part implemented in
Camel-lite's camel-folder-summary.c 

For the writing part, I would simply override the "set_flags" of the
TnyHeader implementation for new messages, to write both in the TnyMsg
instance's top level MIME part (or replace or remove in case of removing
or changing the flag).

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]