Skip to content

Instantly share code, notes, and snippets.

@atomkirk
Created November 8, 2018 03:01
Show Gist options
  • Save atomkirk/9c91ac87e84737758d1f5cf84273b4d9 to your computer and use it in GitHub Desktop.
Save atomkirk/9c91ac87e84737758d1f5cf84273b4d9 to your computer and use it in GitHub Desktop.
compose airmail command line args
osascript sendEmail.applescript 'hello there you' [email protected] [email protected] [email protected]
on run argv
tell application "Airmail 3"
set SUBJ to argv's item 1
set SENDR to argv's item 2
set RECEIPIENTS to argv's (items 3 thru -1)
set newMail to make new outgoing message with properties {subject:SUBJ, sender:SENDR}
repeat with R in RECEIPIENTS
make new to recipient at end of newMail's to recipients with properties {name:"", address:R}
end repeat
compose newMail
activate
end tell
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment