A while ago David Sparks posted this AppleScript which found the first name of an email address. This could be used in a text Expander snippet to title the email from the address in the “To:” field.
tell application "System Events" tell process "Mail" tell text field "To:" of window 1 if UI element 1 exists then set theToRecipient to (value of UI element 1) if (count words of theToRecipient) is greater than 0 then return word 1 of theToRecipient end if end tell end tell
This script no longer works. Does anyone know how to fix it?
This text will be hidden