Hi,
Was hopping someone can help.
trying to write an AppleScript that takes the message ID and subject of the currently selected message in apple mail and send them to a new draft with title being subject of the email and content is the message ID.
however, despite various attempts I am not able to get the subject to be the title of the draft, any help?
tell application "Mail"
set selectedMessages to selection
if selectedMessages is not {} then
set theMessage to first item of selectedMessages
set theMessageSubject to subject of theMessage
set theMessageURL to "message://%3c" & message id of theMessage & "%3e"
end if
end tell
if theMessageURL is not "" then
tell application "Drafts"
activate
set theDraft to make new draft
tell theDraft
set content to theMessageURL
set name to theMessageSubject
end tell
end tell
end if```