Skip to content

Instantly share code, notes, and snippets.

@marcojetson
Created December 8, 2015 17:22
Show Gist options
  • Save marcojetson/6e09d045a4d8bb359e7d to your computer and use it in GitHub Desktop.
Save marcojetson/6e09d045a4d8bb359e7d to your computer and use it in GitHub Desktop.
PacktPub free book of the day
curl https://www.packtpub.com/packt/offers/free-learning | grep -A7 dotd-title | tail -1 | xargs -0 osascript sendmail.applescript [email protected] "Today's free eBook"
on run argv
tell application "Mail"
set msg to make new outgoing message with properties {visible:true, subject:item 2 of argv, content:item 3 of argv}
tell msg
make new to recipient at end of to recipients with properties {address:item 1 of argv}
end tell
send msg
end tell
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment