Re: Setting the priority for outgoing Mail
Re: Setting the priority for outgoing Mail
- Subject: Re: Setting the priority for outgoing Mail
- From: David Gregg via AppleScript-Users <email@hidden>
- Date: Fri, 10 Apr 2020 11:42:41 -0700
> On Apr 10, 2020, at 10:34 AM, Jenni via AppleScript-Users
> <email@hidden> wrote:
>
> I’m trying to figure out how to set the priority of an outgoing mail
> message but my searches haven’t returned any clues.
>
> Is there a way to set a message to High Priority via AppleScript? It
> looks like I'd need to set a header value to:
>
> X-Priority: 1
>
> but I’m not seeing it in Mail’s dictionary. Is it me, or is it Mail?
Frank,
You are correct, there isn't a way to do that through Mail's dictionary.
Here is a simple handler, and example calling code to do it through System
Events (GUI) programming.
This is with Mail 12.4 on macOS Mojave (10.14.6).
set messagePriorities to {Low:1, Normal:2, High:3}
set priority to Low of messagePriorities
my setOutgoingMessagePriority(priority)
on setOutgoingMessagePriority(messagePriority)
tell application "System Events"
tell process "Mail"
set frontmost to true
delay 0.5
click menu item messagePriority of menu 1 of menu item
13 of menu 1 of menu bar item 7 of menu bar 1
end tell
end tell
end setOutgoingMessagePriority
Regards
David
>
> Thanks,
> Frank
> _______________________________________________
> 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
_______________________________________________
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