• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Vacation mail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Vacation mail


  • Subject: Vacation mail
  • From: Michelle Steiner <email@hidden>
  • Date: Sun, 1 May 2005 16:28:29 -0700

Here is a combination of a rule action and an Applescript for when you are on vacation or out of the office for an extended period of time.

It will reply to the sender with a suitable message, and place the sender in a vacation contacts group so it will never send more than one vacation reply.  Of course, when you return, you need to disable the rule and empty the vacation group to prepare for your next vacation.

Rule criteria:
Sender is not a member of Group "Vacation"
To Contains michelle.org (of course you will change this; this criterion is to weed out a lot of spam that does not have you in the TO header.)

Actions:
Reply to Message (configure your own text for the reply)
Run Applescript /Library/Scripts/Mail Scripts/Rule Actions/Vacation script.scpt
Stop evaluating rules

Make sure this is the last rule in the list of rules, so all the other rules have a chance to operate first.  Having "Stop evaluating rules" in each of those (especially those that handle mailing lists) will keep the message from being sent to mailing lists.

Here is the script:

using terms from application "Mail"
    on perform mail action with messages theMessages for rule theRule
        tell application "Mail"
            repeat with thisMessage in theMessages
                set sender_ to sender of thisMessage
                set name_ to extract name from sender_
                set address_ to extract address from sender_
            end repeat
            set fn to first word of name_
            set ln to last word of name_
            tell application "Address Book"
                set new_contact to make new person
                tell new_contact
                    set first name to fn
                    set last name to ln
                    make new email at beginning of emails with properties {label:"other", value:address_}
                end tell
                add new_contact to group "vacation"
                save addressbook
                name of new_contact
                email of new_contact
            end tell
        end tell
    end perform mail action with messages
end using terms from

The only tweak I can think of right now for the script is to create the Vacation group if it does not already exist.

-- Michelle


--
Those who extol the "nobility of labor" mean the labor of others.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Mac OS X 10.4
  • Next by Date: Vacation mail
  • Previous by thread: Re: Mac OS X 10.4
  • Next by thread: Vacation mail
  • Index(es):
    • Date
    • Thread