#204 accepted
Robert Ricci

Feature reqest: Coloring in the message list

Reported by Robert Ricci | December 27th, 2011 @ 06:19 PM

One of the few things I miss in MailMate compared other mailers I've used is the ability to color messages based on sender, subject, etc. in the message list. For example, mutt lets you define coloring criteria in the form of search strings, Thunderbird lets you color based on tags, etc. Sometimes it's nice to be able to quickly see what messages are to me, from me, related to current projects, need to be trained in my spam filter, etc.

In my case, I already have smart mailboxes for all of these things, so being able to color based on the presence of a message in a particular mailbox would be sufficient.

Comments and changes to this ticket

  • benny

    benny December 28th, 2011 @ 02:19 PM

    • Assigned user set to “benny”
    • State changed from “new” to “accepted”

    A search query and a smart mailbox is essentially the same thing in MailMate, and tags can also be matched in a query. So, if a color could be assigned to a smart mailbox then that would probably work for most use cases.

    Now, there are a few questions to resolve first:

    • How should the coloring be done visually? (Currently, a red font is used when a message is pending deletion on the server, but it is rarely seen in practice. And a red dot is shown when a message has the \Deleted flag enabled.)
    • When displaying the smart mailbox itself, should the messages then be colored? (I would say it depends on how dominant the coloring is).
    • How should it be handled when a message is matched by multiple queries (smart mailboxes)?

    In other words, I like the idea, but I need to think about the implementation. Ideas are welcome.

  • Robert Ricci

    Robert Ricci December 28th, 2011 @ 06:16 PM

    The more I think about it, the more I really like the idea of assigning colors to mailboxes - this feels like a very MailMate way to do it, as compared to the match strings, tags, etc. that other mail readers use.

    A few thoughts for how to do it visually:

    1. Color the foreground text based on a configurable color - this is what's commonly done in, eg. Thunderbird
    2. Tint the background of the row
    3. Put some kind of colored 'badge' in the message view

    There are a few variants for 3: Only allow one or allow multiple 'badges', and the badge goes into some existing field (like the subject?) or becomes a new showable/hideable column.

    Personally, I didn't even know about the coloring for messages pending deletion, and I've been using MailMate for a month. So I wouldn't mind if it conflicted with colors I set. Or, heck, you could implement that feature by having a smart mailbox that matches \Deleted messages and has its color set to red. That way, users could disable or modify the behavior if they want.

    As for how to handle matches in more than one colored mailbox: one way to mitigate this would be to support more than one coloring style listed above - eg. I could use background coloring to identify which mailing list a message is from, foreground colors to identify the sender, and badges to mark the spam status. This doesn't make the precedence problem go away, but it does at least let the user set things up in a way that makes it less problematic.

    A possible simple way to handle multiple matches: the one higher up in the MAILBOXES list wins? Doesn't require any new UI, though it might not be obvious to users that's the way things work.

    (Ooh, and wouldn't it be cool if the colors showed up on the thread arcs? That way, I could, for example, easily see where I chimed in, which parts of the thread were explicitly to me, etc.)

    I would be inclined to show the color when looking at the mailbox itself.

  • benny

    benny February 2nd, 2017 @ 10:40 PM

    Update: The following has been updated to reflect recent changes. Note that the word style is now used instead of color. If you have used this feature you need rename both the plist file and the main key in the file. This applies to any release of MailMate newer than r5356.

    Just a quick update since I've done some work on this feature. There's no GUI yet, but the basics work and it might already be useful for some of you. You need the latest test release: Hold down ⌥ when clicking “Check Now” in the Software Update preferences pane.

    You need to explicitly enable this feature:

    defaults write com.freron.MailMate MmMessageColorsEnabled -bool YES
    

    You also need to manually configure it by creating this file:

    ~/Library/Application Support/MailMate/Styles.plist
    

    Here's an example file I've used for testing. I shows the use of 3 types of colorings. You can add as many as you like of these 3 types (although only the first 2 are useful for now). It also shows the use of bold/italic fonts:

    {   styles = (
            {   type = keyword;
                keyword = '\\Flagged';
                color = "#00FF00";
                fontStyle = "bold";
    
            },
            {   type = mailbox;
                color = "#00FFFF";
                uuid = 'INBOX';
                fontStyle = "italic"; // boldAndItalic can also be used
            },
            {   /*disabled = ":true";*/
                type = filter;
                color = "#FF0000";
                uuid = '0249F96D-9B86-452A-B34A-83D83B0125FE';
            },
        );
    }
    

    The first one is the keyword type. This colors emails matching a specific IMAP keywords. This can also be used for tags (which always map to an IMAP keyword). The second one is the mailbox type which colors messages which are in any one of the available mailboxes (the uuid value can be put on the pasteboard by selecting a mailbox and then hit ⌘C). The last one is currently a semi-hardcoded option. It makes emails pending deletion colored red similar to what is currently fully hardcoded in MailMate.

    Everything has been created with a GUI in mind. It's likely to be a tableview in the Viewer preferences pane which allows reordering. The first match determines the color for any given message.

    Let me know if any of you try it out and whether it works for you or not.

    Update: Note that a color can also be one of the standard system color names. This will adapt to the use of dark mode. Make sure the color used is supported on your version of macOS. An example is systemRedColor.

  • benny

    benny February 8th, 2017 @ 10:38 AM

    @Jon: You can already do this since an account is just another mailbox. Select an account under “SOURCES” in the mailbox list and hit ⌘C to put its UUID on the pasteboard (it's not really a UUID in this case, but it's a unique string).

    @Chris: Thanks for the support! I'm very much behind on answering tickets these days and it might take quite some time before you get a reply. Sorry in advance!

  • benny

    benny March 1st, 2017 @ 09:46 AM

    If you update MailMate in the future (not released yet) then you might experience that this feature no longer works. This is because I've changed how it works and you need to update and rename Colors.plist. See instructions further up in this ticket. On the plus-side you can now also use bold/italic fonts when styling.

  • benny

    benny August 11th, 2017 @ 01:54 PM

    @Dmitry: I don't seem to be able to spot any issues with your example file. Is it also not working on the latest test release (r5408)?

    Is it located here:

    /Users/<username>/Library/Application Support/MailMate/Styles.plist
    
  • benny

    benny September 23rd, 2017 @ 12:35 PM

    1. This is the full list.
    2. Create a smart mailbox matching the emails and then use the mailbox keyword to color these emails. That should give you the same flexibility as smart mailboxes provide.
    3. No. And I don't see an easy way to implement that.
  • benny

    benny September 23rd, 2017 @ 12:36 PM

    I should add that I still plan to add a GUI for this feature. I don't think this is going to break backwards compatibility with Styles.plist, but you never know :)

  • Eric Sharakan

    Eric Sharakan January 29th, 2018 @ 05:27 PM

    Hi, as a recent convert to MailMate I've also been missing the ability to color messages via a rule action a la Mail.app (e.g. for messages addressed directly to me). Yes, I know I can achieve the same effect using smart mailboxes and the mailbox style type, but then my sidebar will get cluttered with smart mailboxes I don't plan to interact with directly.

    Being able to color messages directly in a rule would be a nice addition, perhaps as part of adding GUI support for colors?

  • benny

    benny June 7th, 2018 @ 02:22 PM

    @John: Not with keyword, but you could make smart mailboxes matching colors and then use the mailbox option instead. (I haven't tested this.)

  • benny

    benny June 11th, 2018 @ 01:11 PM

    @Eelco: Did you relaunch after making the change? A quick look in the code indicates that first match should win.

  • benny

    benny August 20th, 2018 @ 02:06 PM

    Just for the record, Scott's main problem was a faulty server.

  • benny

    benny August 23rd, 2018 @ 01:52 PM

    @Muescha: Noted. I assume you know that selecting a mailbox and hitting ⌘C puts the UUID on the pasteboard.

  • benny

    benny November 22nd, 2018 @ 01:39 PM

    @Zvi: Sorry about the late response. You are correct and I'll keep in mind that a “negative” comparison would be useful. The only workaround is to setup smart mailboxes which toggles (using rules) another keyword when anything goes read/unread.

  • benny

    benny January 18th, 2019 @ 12:09 PM

    @Nicholas: No, but as you might have seen, mailbox names are some times red (under SOURCES). I could probably add low-level support to set the color of mailboxes, but maybe you should first describe to me how/why you would use mailbox coloring :) (I like use case based feature requests.)

    By the way, coloring all messages in a mailbox is not very useful when viewing that mailbox, but it could be useful when viewing other mailboxes, for example, it can make Inbox messages from a particular account stand out when viewing the universal Inbox.

    Unrelated, I can inform users of the message coloring feature that today I added that the color is also used in the thread arcs view (as a colored circle around the nodes of any colored messages).

  • Chauncey

    Chauncey April 11th, 2019 @ 04:56 PM

    @benny how would I tint the background of a row of a message in the message list? For example, I'd like to tint the background of flagged messages yellow.

  • benny

    benny January 20th, 2021 @ 03:29 PM

    @Sebastian: I'll keep this in mind. Note that you can likely use system colors like systemRedColor which do adapt to the current mode. The available adaptable colors can be found here.

    Everyone else: I'll be sure to review this ticket when I have time to return to this feature. It is likely that I will have to prioritize re-implementing the message list first though (for many reasons) -- and that one is a pretty big todo item.

  • benny

    benny January 22nd, 2021 @ 10:52 AM

    @Sebastian: I'll add it to the manual (and in this ticket).

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Mac OS X email client.

Shared Ticket Bins

People watching this ticket

Referenced by

Pages