Created
December 8, 2015 17:22
-
-
Save marcojetson/6e09d045a4d8bb359e7d to your computer and use it in GitHub Desktop.
PacktPub free book of the day
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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