So basically, in Mail, I'm trying to set it up so that if the word "attach", or "attachment" with any casing is detected and there isn't an attachment on the e-mail, it prompts me to add an attachment to the e-mail. I have Mail Act-On as a plugin to help me add more filters onto my Mail as it comes in and out.

I've made a RegEx in the javascript form for it to find out whenever I type the word in. I've tested it in a website and it comes back as true for the cases of words I've put in, but in Mail.app it doesn't work.

Does anyone have any ideas?

enter image description here

  • Two questions: 1) Have you updated Mail Act-On today? According to the release notes, a new version was just released with a number of bug fixes. 2) Are you sure that regular expression is what you're looking for? Unless MAO uses a modified RegEx syntax, you're probably looking for something more like /[Aa]ttach(ed|ment)?/g, with no asterisk at the beginning. Additionally, it's possible that it doesn't require the surrounding ///g at all.
    – Tuesday
    Nov 22, 2016 at 22:16

1 Answer 1


Mail rules are only applied to new messages in the inbox, not outgoing messages. I don't believe it is possible to have such functionality in Mail natively; you would need to create or install a plugin to do this. After some searching, it looks like there is a Mail plugin which does what you're looking for called Send Companion (free, with other paid features).

If you're running an older version of macOS (Tiger through Snow Leopard), Attachment Scanner (free) looks like it would do the trick.

  • I have Mail Act-On as a plugin - there's an option for Outbox rules in Mail after installing that on it. It's able to stop messages if I have "contains attachment" because I can tell it to prevent outgoing messages. It isn't ideal though, because I haven't got a logical "or" to give it
    – hameedm
    Nov 22, 2016 at 22:03
  • @hameedm The fact that you have Mail Act-On is vital to the question, you should edit your post to reflect that.
    – Tuesday
    Nov 22, 2016 at 22:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .