Skip to content

Instantly share code, notes, and snippets.

@MikeiLL
Created October 18, 2018 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MikeiLL/0a543cc94efe5c8211c21616118d4db2 to your computer and use it in GitHub Desktop.
Save MikeiLL/0a543cc94efe5c8211c21616118d4db2 to your computer and use it in GitHub Desktop.
Apple Script to Email a bunch of people, not too fast, though.
set myMessage to "I'm cleaning up our mailing list. Please hit me back (or go to our site) if you want to be on the new one.
Thanks and I hope you are doing wonderfully.
Many blessings, Mike.
http://www.madhappy.com
"
set mySubject to "New MadhaPPy email list"
display dialog "Please select the recipients in Address Book/Contacts"
tell application "Contacts"
set theContacts to selection
repeat with contact in theContacts
my send_message(mySubject, "Hey " & first name of contact & ",
" & return & myMessage, value of first email of contact)
delay 10
end repeat
end tell
on send_message(theSubject, theBody, theAddress)
tell application "Mail"
set theNewMessage to make new outgoing message with properties {subject:theSubject, content:theBody & return & return, visible:true}
tell theNewMessage
set visibile to true
make new to recipient at end of to recipients with properties {address:theAddress}
send
end tell
end tell
end send_message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment