Re: Retrieving priority information from messages



On Sun, 2007-04-01 at 14:26 +0200, Jos�apena Paz wrote:
> El vie, 30-03-2007 a las 12:23 +0200, Philip Van Hoof escribi� > Flags aren't yet supported by that type. You are invited to implement
> > support for flags in that type.
> > 
> > Note that a problem is that this type is meant for sending through an
> > SMTP or other transport account.
> > 
> > You will often have to translate the flags, like the priority, to
> > headers.
> 
> 	OK, seems a tough work to make the priority flags work for sending
> mails using that information properly. Anyway, a default implementation
> simply maintaining flags information inside shouldn't be that difficult.

I do think that whenever you will be creating a message for transport
(sending it) you do want the priority to be written as a header in the
top level MIME part. This is more or less the only way to mark your
message as important anyway.

> 	I mean, for now, and only for showing priority information of incoming
> messages, maintaining priority information should be enough. And then,
> in specific implementations for transports, it would be used (or not).

Aha, so it's mostly about the fact that the tny_folder_get_msg returns a
message that contains a TnyHeader that is a different instance than the
TnyHeader that you got from the summary.

Still, I think it's preferable to save the header in the top level MIME
part rather than keeping a flags within the TnyHeader implementation
being used, and copying it.

> 	Would it be ok to do this?

I would prefer to have it as a header in the top level MIME part too.

> > For example when that priority is set using the flags, you should rather
> > have to add a header than just setting the flag. To get that flag you
> > should read whether there is such a header (X-Priority).
> 
> 	Yes, and update it properly. And even update it properly in a way that
> it works with as much MTA's as possible (unfortunately it seems there's
> no clear standard for this) :(.
> 
> > This should also explain why it's not implemented for this type (it's a
> > lot work to get it right, and it's going to depend per transport account
> > type. Although getting it right for SMTP sounds like an excellent idea
> > indeed).
> 
> 	Yeah, a fast google query about how priority is handled in different
> smtp servers shows that there are different ways to implement this :S.


Just set the X-Priority header in the top level MIME part and don't
(yet) care to much about those SMTP servers.







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