Blogged Et Animam Levavi

7 Responses

Subscribe to comments with RSS.

  1. Irene said, on February 28, 2006 at 16:47

    This is a great script. i am in the process of sitching from Eudora to Mail and had a similar script for Eudora, Howvere, I;d like it even better if this cript would announce not the email part before the @ sign, but the name of the perosn which is often included before or after that email address.
    For example: Jonathan Miller may email as jrm@xyz.com and rather than here “jrm” which probably sounds like “germ” I’d like ti to say “Jonathan Miller”
    Can you help?

  2. George Sudarkoff said, on March 2, 2006 at 11:45

    The line ’set the_sender to extract name from sender of a_message’ extracts the name of the sender from email header, not their email address. Unfortunately, for this to work correctly the field From: should include the name of the sender. It should look something like this:
    From: Jonathan Miller <jrm@xyz.com>
    If it doesn’t — that’s why you hear “germ”.
    There’s couple of things you can do about it. First, and I understand that it’s not always possible, you can ask Jonathan to configure his email client to always put the name in the From: field. Most probably all it takes to achieve that is to fill in the name field of the account settings. Second, you can try and parse the signature from an email message, but I wouldn’t advice taking this route as it is not a simple task. Finally, you can create a LUT (look-up table) and manually populate it with custom names of your regular senders. This is the easiest and most reliable way of solving the problem. Please let me know if you need further help.

  3. Mark said, on December 9, 2008 at 11:54

    Is there a way to just get it to say “you got mail” or something to that effect rather than the senders name?

  4. George Sudarkoff said, on December 9, 2008 at 12:04

    Mark, just replace this line:
    say “Mail from ” & the_sender
    with something like this:
    say “You got mail.”

  5. Kayla said, on January 18, 2009 at 13:24

    How do you get this to work? I can get into the Apple Script editor, but I have no clue where to go from there. Thanks!

    • Marco said, on June 1, 2009 at 15:07

      Ok this is for Kayla: first copy the code above, then open Apple Script Editor, create a new document, paste the code, [DON'T CHANGE ANYTHING], save it as a script (Give it a name) and place it on ~/Library/Scrpts/Mail Scripts (If Mail Scripts doesn’t exist create it) btw “~” means the User name such as “John”, now open Mail, then mail preferences, and go to rules, create a new rule put any description you want like “Announce New Mail” then if ANY of the following conditions are met:, FROM, CONTAINS, then type “@” without the quotes, then where it says Perform the following actions: choose RUN APPLESCRIPT, then select the scripts from the folder where you placed it which is ~/Library/Scripts/Mail Scripts and Voilà! Test it with music playing on iTunes of course and ask someone to send you a e-mail message or just message yourself. IT SOUNDS BEAUTIFUL!!!

  6. Mausy5043 said, on July 5, 2009 at 23:12

    Hi,
    The script is great. I just love it. However… I also use Mail to receive RSS articles. Whenever an RSS article arrives, the script pauses iTunes but doesn’t restart it. I’ve added an errorhandler and found that an error is generated (-1728 Can’t get <>). Obviously, there is no From: header in an RSS article. This causes the error. But, now I’m at a loss how to solve this.
    Is there a way to detect the type of message (RSS or email) so I can distinguish between them, “say” different things and (most importantly) restart iTunes again?
    Thanks, Mausy5043


Leave a Reply