Automate tasks in Mail on Mac
You can make it easier to use the Mail app on your Mac by automating Mail tasks and workflows using the Script Editor and Automator apps on your Mac.
Use Script Editor: Use terms in scripts to automate tasks, such as creating and sending messages automatically. You can also attach a script to a Mail rule and have the script run whenever the conditions in the rule are met.
Use Automator: Link several Script Editor actions into a workflow. For example, you can create a workflow to send messages to all of your contacts.
You can use Launchpad in the Dock to open Script Editor or Automator.