Automate Email

Probably 90% of the time I spend using my Mac involves one of four apps: a text editor, a word processor (I am an author, after all), a web browser, and an email client. I send and receive large quantities of email, and I use email far more frequently than phone calls or instant messaging—maybe even more than speaking. It’s my main means of communication.

Because my incoming and outgoing email volume is so high, I can’t bear to spend any more time or effort than is absolutely necessary on filing or searching for messages. So I’ve thought long and hard about how to automate as much of that process as possible—while still ensuring that important messages never slip through the cracks.

One of my key strategies is to use rules (sometimes referred to as filters) to process messages as they come in. Each rule looks for certain conditions (criteria such as a sender, subject, or words in the message body), and then takes one or more actions whenever a match is found. For example, the rule might move the message into a certain mailbox, send an automatic reply, or delete the message.

If you’re trying to keep your inbox under control, rules are one of the most powerful tools available. Because I presort my email with rules, tons of messages that don’t require immediate attention never reach my inbox at all; instead, they’re safely shunted to other mailboxes where I can review them at my convenience. Creating a good set of rules requires a bit of thought and effort, but once you’ve done that, those rules operate invisibly in the background.

Rules are a very powerful organizational aid, but making them is just one aspect of automating email. You may also want to simplify the manual filing of messages that aren’t picked up by rules, add plugins that automate various other email actions, or use smart mailboxes as search shortcuts. I cover all those activities in this chapter.

Use Server-Based Rules

Rules can operate either in your email client (such as Apple Mail) or directly on your incoming mail server. The huge advantage to server-based rules is that they can presort messages before you see them, even if your Mac email client isn’t running. That greatly reduces the amount of mail you need to deal with on your iPhone or iPad.

I recommend starting with server-based rules if possible and then using rules in your email client for the actions you can’t accomplish on the server, like running user-defined AppleScripts on matching messages or moving messages to mailboxes in other accounts.

Check with your email provider to see whether it offers server-side rules or filters, and if so, what the procedure is to configure them. Here’s how to get started with iCloud and Gmail:

  • iCloud: Log in to your account at iCloud.com. Click Mail, and then click the gear icon in the lower-left corner and choose Rules from the pop-up menu. Click Add a Rule to configure your first rule.

  • Gmail: Log in to your Gmail account (using this link or whichever URL you normally use for a Google Apps account with a custom domain). From the Settings pop-up menu at the top of the page, choose Settings, and then click Filters and Blocked Addresses. Click “Create a new filter” to begin setting up a custom filter.

Although the details vary from one provider to the next, rules always contain one or more conditions (things to search for) and then, when there’s a match, perform one or more actions. For example, look for any message from a certain address (say, a company’s PR department) and file it in a Newsletters mailbox.

If your email provider doesn’t offer server-based rules, or if its conditions or actions don’t meet your needs, you can move on to rules in your email client. If Mail is your preferred client, that’s just one of the ways you can automate your email.

Automate Apple Mail

Apple Mail is my email client of choice, and as I mentioned, I go to great lengths to automate my email. In this chapter, I’ll cover my three main techniques: using rules to pre-sort my messages, using plugins to file and otherwise work with them once they’re in my inbox, and using smart mailboxes for searching. This information largely comes from my book Take Control of Apple Mail, which has far more detail—not just about automation but also about using email more effectively, troubleshooting problems, and becoming a better correspondent.

Manage Incoming Apple Mail with Rules

Whether or not you use server-based rules, you might want to set up rules within Mail. They work essentially the same way—sorting, deleting, replying to, or otherwise processing incoming messages. But they can do a few things server-based rules can’t do (such as moving a message to a different account and running an AppleScript). And, if you can’t use server-based rules, Mail’s rules are the best way to manage the flow of incoming messages.

Create a Rule

To create a basic rule, follow these steps:

  1. Go to Mail > Preferences > Rules and click Add Rule.

    A dialog appears showing the condition(s) the rule checks for and the action(s) Mail takes if the conditions match (Figure 34).

    Figure 34: Use this dialog to specify the condition(s) and action(s) for your Mail rule.
    Figure 34: Use this dialog to specify the condition(s) and action(s) for your Mail rule.
  2. Enter a name for the rule in the Description field.

  3. Create a condition. Start by choosing something from the left-hand pop-up menu in this area. Depending on what you choose, you may now see a second pop-up menu, a text field, or both. Here are some examples of completed conditions:

    [From] [Contains] apple.com
    [Subject] [Begins with] Take Control
    [Date Sent] [Is Less Than] 3 days old
    [Message Content] [Does not contain] Sierra

  4. From the provided pop-up menus, choose the action you want the rule to perform on a message if (and only if) it matches the condition you just specified. (Just ahead I explain how to handle rules that include multiple actions.)

    Here are some examples:

    [Move Message] to mailbox: [Filed]
    [Set Color of Message] [of background] [Blue]
    [Reply to Message] (Click the button and fill in your stock reply)
    [Mark as Read]

    If you use a rule to move a message, choose your target mailbox carefully. In general, unless you mean to specifically archive the message to a local mailbox, you’ll want to move it to a server-based mailbox—most likely in the same account—so the message will be available on all your iOS devices and other Macs.

  5. Click OK.

    An alert appears, asking if you want to apply your rules (including the one you just created) to messages in selected mailboxes.

  6. Click Apply or Don’t Apply, as you prefer. I generally suggest clicking Don’t Apply, because applying new rules to messages in open mailboxes can have unexpected and potentially unpleasant results.

  7. If you’re finished creating rules, close the Preferences window.

Your new rule now checks all incoming messages for matches and performs the actions on them that you set.

Rule Examples

One of the most common uses for rules is to process messages that follow predictable patterns. If you find yourself filing, flagging, or deleting a certain type of message at least once a week, you can save time and effort by setting up a rule to do it for you. Examples are mailing lists, utility bills, bank statements, newsletters, travel discount offers, and jokes forwarded by friends or family members.

Here are a few rules I use:

TidBITS issues:

If Any of the following conditions are met:

[From] [Contains] [email protected]

Perform the following actions:

[Move Message] to mailbox: [Lists]

Any public Apple mailing list:

If Any of the following conditions are met:

[From] [Contains] @lists.apple.com
[Cc] [Contains] @lists.apple.com

Perform the following actions:

[Move Message] to mailbox: [Lists]

Feedback about this book:

If Any of the following conditions are met:

[Subject] [Is] Take Control of Automating Your Mac

Perform the following actions:

[Move Message] to mailbox: [Take Control Feedback]

Mail applies rules automatically to messages as they are delivered to your inbox. Sounds about right, but there is a hitch. Mail does not apply rules to messages that arrive in other mailboxes, even if the messages are unread. That means if you have a server-based rule that moves certain messages to your Family mailbox, those messages bypass your inbox and therefore don’t get processed by Mail’s rules.

You can manually apply rules to selected messages, wherever they reside, by choosing Message > Apply Rules. For example, you might want Mail to use rules to re-sort messages that were moved into the wrong mailbox by the server. However, note that that command applies all your rules, not just a specific rule. If you want more control over after-the-fact rules, try the Mail Act-On component of SmallCubed’s MailSuite plugin, discussed ahead.

Automate Apple Mail with Plugins

Numerous third-party Mail plugins let you give the program new features, enable significant customization options, and even zap unwanted features. For example, plugins can stop spam, encrypt email messages, offer advanced message filing options, change the way attachments are handled, and much more.

I won’t try to catalog all the available Mail plugins here, but I do want to put in a plug (so to speak) for a few plugins that I find especially helpful for automating Mail above and beyond what rules do. These plugins allow me to act on messages in my inbox and save time when composing or replying:

  • MailSuite is my favorite Mail plugin by far. It combines four plugins that the developer, SmallCubed, previously sold separately: MailTags, Mail Act-On, Mail Perspectives, and SigPro. Of these, the first two are particularly relevant to this book:

    • Mail Act-On is a multipurpose tool that adds numerous features, but the one I like best is its clever approach to filing messages. Mail’s built-in rules run automatically when messages are received, but Mail Act-On adds another layer of rules that run on demand, via keyboard shortcuts—or when a message is sent. You can even combine multiple rules in a single keyboard shortcut.

      For example, I can select a message and press my keyboard shortcut that means “do the right thing with this message,” and it will move the message into Mailbox A if it’s from person A, B, or C, but put it into Mailbox B if it’s from person X, Y, or Z. It’s extremely clever, and that’s only one tiny example of what Mail Act-On can do.

    • MailTags adds tagging to Mail messages (as the name suggests) as well as numerous other advanced organizational tools.
  • MailButler, like MailSuite, is more like a collection of plugins than a single tool. Among its many capabilities:

    • Convert an email message to a to do item.

    • Schedule messages to be sent in the future.

    • Snooze a message so that it disappears from your inbox, but then reappears later.

    • Unsubscribe from mailing lists with one click.

    MailButler’s basic features are free, and even advanced capabilities can be used up to 30 times per month without charge. Higher-volume usage of advanced features requires a paid subscription.

  • SpamSieve: If you get too much spam in your inbox even after server-side filtering, SpamSieve is the best tool, by far, for separating the wheat from the chaff.

  • QuoteFix: This plugin lets you customize quoting to your specifications. For example, you can more easily put quoted text first and your reply after (so your recipient needn’t jump around in the message to understand the context). Unfortunately, it hasn’t been updated since Mojave.

Search Faster with Smart Mailboxes

Back in Create and Use Smart Containers, I explained what smart mailboxes are (basically, saved searches) and how to create them. If you click a smart mailbox icon, it should initially display exactly the same messages as the search you used to create it. As you receive and delete messages that meet your criteria, the list will change.

Here are my favorite suggestions for making smart mailboxes:

  • Show all correspondence with a specific person or group: Choose Any from the pop-up menu at the top. Add two conditions, [From] and [Any Recipient], both of which include the other person’s email address. (To show conversations with more than one person, create a new Contacts group with all the names you want to include, and instead of [From], choose [Sender Is a Member of Group] [some-Address-Book-group]. Then add [Any Recipient] conditions for each person in the group individually.)

    Make sure you select Include Messages from Sent to pick up your messages to this person. For even better results, choose View > Organize by Conversation to display all your exchanges in a threaded conversation.

  • Display recent unread messages: If you use rules to move messages into different mailboxes, you might enjoy seeing all your unread messages—wherever they may be—in a single place. If you like, limit these to messages received in the last day (or few days).

  • Locate attachments in Sent mail: If you often send photos or other large attachments, their copies in your Sent mailbox can take up a lot of space, and you probably have the originals. Make a smart mailbox with two conditions: [Contains Attachments] and [Message is in Mailbox] [Sent]. From time to time, check this mailbox; to remove attachments from these messages, select them and choose Message > Remove Attachments.

  • What to do if All and Any aren’t smart enough: If you use the [Message is in Mailbox] condition, the contents of one smart mailbox can depend on another smart mailbox. This is handy when you have so complex a set of conditions that Any and All are too limited. For example, you might have one smart mailbox that lists messages from any (“Any”) of several friends, and another that lists messages that are both in the first smart mailbox and (“All”) marked as high priority.

  • Look for group members: Use the [Sender is a Member of Group] option to search for messages from people in one of your Contacts groups. And yes, you can even refer to smart groups, so that as your contacts’ information changes, the contents of the smart mailbox track the automatic changes in smart group contents.

Automate Outlook Email with Rules

Whatever you may think of Microsoft in general or Office in particular,Microsoft Outlook for Mac is a highly capable email client with extensive automation capabilities. You can create rules much like those in Apple Mail, but with a few key differences:

  • Each incoming account type (Exchange, POP, and IMAP) has its own distinct rules.

  • You can also create rules that apply to outgoing messages. (In Mail that requires a third-party plugin).

  • In addition to rules that match Any and All conditions, you can specify negative matches—“Unless any conditions are met” and “Unless all conditions are met.”

  • The conditions and actions available are somewhat different from Mail’s, but the most crucial one, in my opinion, is that while Outlook’s rules can match any header or metadata, they can’t search the message body on incoming IMAP messages—only on messages coming from POP and Exchange accounts.

To create a rule in Outlook:

  1. Choose Tools > Rules.

  2. Select an account type in the list on the left.

  3. Click the plus button.

  4. Enter the desired condition(s) and action(s), give the rule a name, and click OK.

The rule begins working immediately.

Automate Other Email Apps

I’ve focused here on Mail and Outlook because of their popularity. But lots of other Mac email clients contain rules and/or other automation features, too, including:

I refer you to the apps’ documentation to discover how to use their respective automation features.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset