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 15:02:59 -0400
So, exactly how dumb is this?
Somebody sent me a little test thingy:
tell application "Mail"
set Msgs to selected messages of first message viewer
set MsgProps to properties of first item of Msgs
end tell
If I run it while a message is selected that has already been filed (in a
separate folder), it seems to work:
RESULT:
{mailbox:mailbox "Lists/AppleScript" of application "Mail", deleted
status:false, all headers:"Return-Path:
<applescript-users-bounces+sbird=email@hidden>
Return-Path: <applescript-users-bounces+sbird=email@hidden>
Delivered-To: email@hidden
Delivered-To: email@hidden
… blah, blah, blah, for “all headers”
", id:138117,
was replied to:false,
flag index:-1,
date received:date "Monday, May 8, 2017 at 3:31:53 PM”,
message id:"488A77C9-2BB3-4EE1-9A95-DEA935B9 < address removed>”,
background color:none,
subject:"Getting around Log's limitations”,
read status:true,
floating:false,
message size:22401, \
date sent:date "Monday, May 8, 2017 at 3:30:34 PM”,
junk mail status:false,
reply to:”<Address removed >”,
source:"Return-Path:
<applescript-users-bounces+sbird=email@hidden>
blah, blah, blah for “source”
", sender:”<address removed>”,
class:message,
was forwarded:false,
was redirected:false,
content:"set RList to {}
blah, blah, blah for “content”.
}
IOW, the properties are there.
But if I drag THE SAME MESSAGE to my Inbox and run the script, I get an error:
error "Mail got an error: Can’t get mailbox \"INBOX\" of account \"SBird\"."
number -1728 from mailbox "INBOX" of account “SBird"
Why is it looking for INBOX, when the name is “Inbox” ?
What does it want a mailbox at all, I’m asking about a message.
----------------------------------------------------------------
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