Example 1: Apple Mail

This example shows you how you can receive an SMS to let you know you received an email from an important friend or contact.

First we need to write an AppleScript to send ourselves an SMS. The script is very simple. Below is the AppleScript code.

application "SMS Mac Scripting"
                           set m to make new outgoing sms with properties {flash:false}
                           tell m
                                 set message to "Mail from Steve!"
                                 set recipients to {"+34601234567"}
                                 on error errMsg number errNum
                                       display dialog "Error: " & errNum & ". " & errMsg
                                 end try
                           end tell
                     end tell

Of course, in the recipients attribute you need to enter your own mobile number in international format. Enter this code and save the script as "Send SMS.scpt" in your Documents folder. Launch Apple Mail.app and choose Preferences from the Mail menu. Click the Rules icon and then press the Add Rule button.

  • Give the rule a name, for example, Send SMS.
  • Add the condition that the From field of the email must contain your important friend's email address.
  • As Action to take, choose the action Run AppleScript from the Action popup menu and use the Choose button to select the SMS Mac script.
  • Click OK to finish the rule.

Mail Rule

Home Page


macOS 10.13 and up
Send SMS Widget:
macOS Mojave and lower