HomeAppleapplescript - Mac Mail - Set signature by sending tackle

applescript – Mac Mail – Set signature by sending tackle


I take advantage of macOS’s Mail app and have iCloud+. I’ve two mail addresses – my ordinary iCloud tackle and one other via a customized area that I personal, that maps again to the iCloud account (one thing which is simply doable with iCloud+ )

Incoming mail for each addresses seem in my iCloud inbox. No actual drawback. When composing outgoing mail I can choose the sending tackle from the drop down within the “From” discipline. Additionally no drawback.

I’ve arrange two mail signatures, one supposed for mail despatched for the iCloud tackle, the opposite for mail despatched for the customized tackle. When composing, each signatures can be found from the “Signature” drop down. All good.

I wish to have Mail choose the right signature in keeping with the “From” tackle. If I modify the chosen “From” tackle, the chosen signature also needs to change. Is that this doable?

The problem appears to be that the configuration of Mail, iCloud+ and the customized area leads to Mail pondering that there’s just one account (in Mail/Settings/Accounts ) which is the iCloud one. My two signatures are each related to that one account, though they’re supposed totally different for sending addresses. Mail sees that the sending account is iCloud and appears unable to pick out a signature by sending tackle.

Is there a approach round this utilizing AppleScript or different instrument?

In Mail/Settings/Guidelines I’ve made the rule:

If From is the same as [email protected] , Run this applescript

inform software “Mail”
set theMsg to (get first outgoing message)
set message signature of theMsg to signature “albert”
finish inform

and I’ve a signature known as albert, and one other rule and script that ought to do the identical for the customized tackle.

The script itself works, however Mail’s guidelines appear to be solely work on incoming mail and never outgoing.

Consequence: Neither of the principles and the scripts get triggered.

Is there a approach to get mail to run a script on altering the sending tackle? Or different approach to set the signature by sending tackle?

Mac OS 13.2.1 , Mail 16.0

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments