Hopefully, I can explain what I am attempting to achieve. I have an email address designated for SMS ([email protected]) This account gets check via Mail (apple V13). I have a rule that every message does an Applescript as follows:
using terms from application "Mail" on perform mail action with messages newMessages repeat with newMessage in newMessages tell application "Mail" set theText to "" set theSubject to "" repeat with theMessage in selectedMessages set theText to theText & (content of theMessage) as string set theSubject to theSubject & (subject of theMessage) as string tell application "Messages" activate --steal focus set targetBuddy to theSubject set targetService to id of service "SMS" set textMessage to theText set theBuddy to buddy targetBuddy of service id targetService send textMessage to theBuddy end tell end repeat end tell end repeat end perform mail action with messages end using terms from
Unfortunately it does not work and for the life of me I dont understand why.
Could I ask for some assistance?