Skip to content

Instantly share code, notes, and snippets.

@kennethgeerts
Created January 31, 2014 12:37
Show Gist options
  • Save kennethgeerts/8731387 to your computer and use it in GitHub Desktop.
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 "[email protected]"
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