EN DE

Studio Agenturbüro Studio Agenturbüro

⏏︎ / Archive / 2025 / MailMate's conditions

MailMate's custom conditions prevent email accidents

Created: 2025-01-27

If you use a Mac and manage a lot of mails, MailMate is a proper killer app.

After sending mails to wrong recipients due to autocompletion errors – newer recipients change the order of autocomplete propositions – I decided to research if you could prevent said accidents.

Built-in checks

MailMate's numerous preferences come with a default condition to check against missing attachments – you can configure a search pattern in Settings/Composer against mentions in the message text:

MailMate preference pane showing regular expression to check against attachment mentions

which looks like this:

MailMate warning stating “The message contains the word “attachment” while nothing is attached – Send Anyway or Edit Message”

Creating custom checks

One of MailMates many –hidden– preferences is checking against custom conditions much like the attachment prompt.

The example code is missing examples for conditions though.

Turns out it's the same checks being used in smart mailboxes. So you

  1. create a smart mailbox with the conditions you want to check against
  2. copy it's conditions in ~/Library/Application Support/MailMate/Mailboxes.plist
  3. to a custom check in ~/Library/Application Support/MailMate/Resouces/MessageVerifications.plist like this:
{
    verifications = (
        {
            title = "Sure to send to Jane Doe?";
            details = "`jane.doe@example.com` appeared in To";
            conditions = "to.address ~ 'jane.doe@example.com'";
        },
        {
            title = "Sure to send to Jane Doe?";
            details = "`jane.doe@example.com` appeared in CC";
            conditions = "cc.address ~ 'jane.doe@example.com'";
        }
    );
}

Now

  1. restart MailMate

and voilá:

MailMate warning stating “Sure to send to Jane Doe? – Send Anyway or Edit Message”

You may now check against everything you can come up with: company domains, weekdays, office hours.




© 2020–25 Studio Agenturbüro — contact@studioagenturbuero.comimprint, privacy policy, credits.