Skip to content

Instantly share code, notes, and snippets.

@kennethgeerts
Created January 31, 2014 12:37
Show Gist options
  • Select an option

  • Save kennethgeerts/8731387 to your computer and use it in GitHub Desktop.

Select an option

Save kennethgeerts/8731387 to your computer and use it in GitHub Desktop.
Intake mail
tell application "Mail"
set theSubject to "Clean me up!"
set theContent to "Nothing interesting here..."
set theAddress to "cleanup.secs@mail.ci.apps.up-nxt.com"
set theAttachmentFile to "Macintosh HD:Users:kenneth:Dropbox:contact.jpg"
set msg to make new outgoing message with properties {subject: theSubject, content: theContent, visible:true}
tell msg to make new to recipient at end of every to recipient with properties {address:theAddress}
tell msg to make new attachment with properties {file name:theAttachmentFile as alias}
send msg
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment