Re: Running Scripts from Mail Rules
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