Got this working on my Mac before I update it to Sierra today
getsignatures("")
on getsignatures(paramString)
tell application "Mail"
set listOfSignatures to "Default"
set siglist to name of every signature
repeat with sig in siglist
if listOfSignatures is not "" then
set listOfSignatures to listOfSignatures & ";"
end if
set listOfSignatures to listOfSignatures & sig as string
end repeat
set result to listOfSignatures as string
end tell
end getsignatures
I have two signatures in Mail and it give me two times a missing value now in Sierra.
Update: Also setting the Signature with script is not working, but that is not strange if you can’t read them.
Seems to be a bug in Sierra, Where can we report this ?
Hi, another problem with Mail and AppleScript
I uninstalled Sierra because of that but found a workaround posted on Apple forums:
try
set message signature of new_message to signature mySignature
on error --BUG SIERRA
tell application "Mail" to activate
tell application "System Events"
tell process "Mail"
click pop up button 1 of window 1
delay 0.1
keystroke "g" --put here the first letter of the name of your signature
delay 0.1
keystroke return
delay 0.1
end tell
end tell
end try
:o :o :o :o :o
I can’t believe it but… Apple did fix the broken signature with Apple Mail in Catalina…
It was broken since Sierra…
So, this now works :
tell application "Mail"
set newMessage to make new outgoing message with properties {subject:"Incredible news", visible:true, content:"Hello !"}
delay 1
set message signature of newMessage to signature MySignature
end tell
It seems miracles happen… :rolleyes:
Or maybe it’s because of a new bug that restores this command accidentally :lol: