• 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
Re: Running Scripts from Mail Rules
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running Scripts from Mail Rules


  • Subject: Re: Running Scripts from Mail Rules
  • From: email@hidden
  • Date: Fri, 27 Oct 2017 17:34:35 -0400

This script works fine as a Mail rule IF THE MESSAGE IS ALREADY FILED in a
mailbox.

It does NOT work if the message is in the Inbox, in “Sent Messages”, or maybe
other places.

using terms from application "Mail"
        on perform mail action with messages Msgs
                repeat with M in Msgs
                        try
                                set S to (extract name from (sender of M))
                                say ("You have new mail from " & S)
                        on error
                                display dialog (errMsg as rich text)
                        end try
                end repeat
        end perform mail action with messages
end using terms from


My Mail rule moves the message into a particular mailbox BEFORE running this
script.
Apparently not long enough before.

----------------------------------------------------------------
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
www.Culverson.com                     (toll free) 1-877-676-8175




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Running Scripts from Mail Rules
      • From: email@hidden
References: 
 >Running Scripts from Mail Rules (From: Steve Bird <email@hidden>)
 >Re: Running Scripts from Mail Rules (From: Ray Robertson <email@hidden>)
 >Re: Running Scripts from Mail Rules (From: Steve Bird <email@hidden>)
 >Re: Running Scripts from Mail Rules (From: email@hidden)
 >Re: Running Scripts from Mail Rules (From: email@hidden)

  • Prev by Date: Re: Running Scripts from Mail Rules
  • Next by Date: Re: Running Scripts from Mail Rules
  • Previous by thread: Re: Running Scripts from Mail Rules
  • Next by thread: Re: Running Scripts from Mail Rules
  • Index(es):
    • Date
    • Thread