Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Send text message notices of new e-mails in Mail Apps
Using Mail's rules and AppleScript, I have created a method for notifying me via text message whenever I get e-mail. The great thing about this is that with Mail's rules, you can be notified about e-mail from only a specific group, only high priority messages, etc.

To set up your own mail notification, simply make a new AppleScript in Script Editor, and paste my code into the new script. Replace this line:
<<Your Phone's e-mail address>>
...with your phone's e-mail address (see this page to find out what your address is, or Google it). Save the script wherever you'd like.

Now, in Mail, make a new rule (Preferences: Rules: Add Rule), or just modify an existing one. Set whatever "If" criteria you want, then under "Perform the Following Actions," select "Run Applescript" then choose the script you just made. Make sure the rule is active, and you're done!

Now, due to some weird bug with AppleScripts in rules, when I tested this at first, it seemed like Mail was not applying the rule to test e-mails I sent to myself. However, since then, this script has performed flawlessly in notifying me promptly whenever I receive new mail from select contacts.
    •    
  • Currently 1.50 / 5
  You rated: 1 / 5 (4 votes cast)
 
[10,615 views]  

Send text message notices of new e-mails in Mail | 11 comments | Create New Account
Click here to return to the 'Send text message notices of new e-mails in Mail' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Send text message notices of new e-mails in Mail
Authored by: rspress on Mar 28, '06 06:49:00AM
For those who don't need such and elaborate what of being notified when a message comes in they can do what I do.

I go to the AT&T Natural voices demo site and use the form to make a voice message to alert me when a specific person emails me. I use the English Female voice to record something like, "You have an email from Jessica Alba" and then I save the file to the hard drive. I then make a rule to play that sound when that person emails me. I find this great as it works in the background and if I am in earshot of the computer I know when I get an email from that person.

http://www.naturalvoices.att.com/demos/

[ Reply to This | # ]
Send text message notices of new e-mails in Mail
Authored by: The Cardinal on Apr 07, '06 05:17:37AM

Could you tell us how you saved the recording please.



[ Reply to This | # ]
Send text message notices of new e-mails in Mail
Authored by: MacOfTheEast on Mar 28, '06 07:07:06AM

Have you considered modifying your script to actually forward the incoming email message to the phone as opposed to just alerting that it has arrived?



[ Reply to This | # ]
Send text message notices of new e-mails in Mail
Authored by: nedaf7 on Mar 28, '06 02:14:24PM
Yup in fact that was my original objective, however even very short messages were getting cut off, I think due to a character limit of text messages. If you would like to try it just add & content of eachMessage in the contents of the new notification message (perhaps after "& date sent of eachMessage"). I had some code to only forward the body of the message if it was small, but i was still only getting about one line of the body. If you have more success with having the body forward, but want help getting it to only forward the body if it's small, just let me know. I didn't try it, but you could also try using "source of eachMessage" instead of "content". Oh and the reason I didn't much mind that I couldn't get the body was that I use GMail and thus could get to the actual message by pointing my phone's web browser to m.gmail.com

[ Reply to This | # ]
Send text message notices of new e-mails in Mail
Authored by: solipsism on Mar 28, '06 12:44:24PM

This is really cool! My one issue is that I get hundreds of emails a day. I would love to be able to restrict the SMS alert to only messages that fit certain critera setup in Mail.app. How would I modify this to allow me to only recieve from a certain rule (eg: SMS) which I could alter under Rules in Mail.app, at will, without affecting the AppleScript functionality.



[ Reply to This | # ]
Send text message notices of new e-mails in Mail
Authored by: nedaf7 on Mar 28, '06 02:19:31PM

The great thing about this solution is that you only add the Applescript as an action on the rules you want to trigger it. So, if you already use rules, just add a new action in the ones that you want to forward and tell it to run the script. If you don't already use rules, you could make a new one and tell it to notify you, for instance, of messages that are urgent and from contacts in your address book. The script will not notify you of e-mails that don't fall under any rules that call the script.



[ Reply to This | # ]
Send text message notices of new e-mails in Mail
Authored by: ryebrye on Mar 28, '06 10:57:44PM

Of course, if you want access to all your email on the road - get a BlackBerry... Trust me, it's addictive...



[ Reply to This | # ]
Send text message notices of new e-mails in Mail
Authored by: vclimber on Mar 28, '06 11:16:00PM

Cool idea. I tried it and it works great. So that got me playing with the rules in Mail. If you simply create a rule to forward the e-mail to your cell phone from chosen senders, the whole e-mail message will make it over and you can avoid using the Applescript alltogether.



[ Reply to This | # ]
gets better
Authored by: jbusch on Mar 29, '06 01:26:02PM

I was just about to submit the hint about sending email alerts to your phone, when I found it already existed. I do have something to add, however. I also send alarms to my cell phone from iCal. Just go to the area where you select different venues for sending an alarm. Choose, email, and then I highlight the web address of my cell phone, (which I have previously listed in my address book). Then if I'm on the road, I can send notices to my phone days, hours, or minutes before event.



[ Reply to This | # ]
Send text message notices of new e-mails in Mail
Authored by: csaunders4z on Feb 20, '07 11:01:21PM

This script worked perfectly and did exactly what this applescript newbie had been attempting for ages! I had a few typos in my script that were fouling things up, so you were a lifesaver.

I was getting tired of forwarding entire emails to my mobile phone, which resulted in them being truncated and sometimes blocked when the originals had attachments. Sending just an alert works great for me.



[ Reply to This | # ]
Working link to find phone address
Authored by: clytie on May 31, '12 03:27:48AM

The link in the Hint is broken. This one works:

http://oreilly.com/pub/h/3249

Just send a text to your own email address. The sending address will be your phone's address.

---
Clytie Siddall -- Renmark, in the Riverland of South Australia

MacBook Pro mid-2009, 2.8 GHz, 4 MB RAM, latest OSX; iPhone 3G latest OS



[ Reply to This | # ]