Color coding unread marks based on TO, CC, BCC fields

I am trying to color code unread messages based on where my name appears in the mail header.For example:

If I’m in the “TO” field, unread message color = red

If I’m in the “CC” field, color = green

If I’m in the “BCC” field, color = blue

Once they’ve been read, color = black.

Any advice would be greatly appreciated!

Subject: * tricky…

Subject: color coding unread marks based on TO, CC, BCC fields

of course it’s possible to get different colors in the view, but not depending on the unread/read status of the document

to get different colors, add a hidden column and set ‘Use values as colors’

_name := @LowerCase( @Name([CN]; @UserName));

_red := 255:0:0;

_green := 0:255:0;

_blue := 0:0:255;

_black := 0:0:0;

@If(

@Contains( @LowerCase( @Implode( SendTo )); _name ); _red;

@Contains( @LowerCase( @Implode( CopyTo )); _name ); _green;

@Contains( @LowerCase( @Implode( BlindCopyTo )); _name ); _blue;

_black)

Subject: RE: color coding unread marks based on TO, CC, BCC fields

Works like a charm - Thanks!