Skip to content

Instantly share code, notes, and snippets.

@yuanfeiz
Created November 14, 2012 16:08
Show Gist options
  • Save yuanfeiz/4073000 to your computer and use it in GitHub Desktop.
Save yuanfeiz/4073000 to your computer and use it in GitHub Desktop.
mail to reminders
tell application "Mail"
using terms from application "Mail"
set selectedMails to selection
set theMessage to first item of selectedMails
set theBody to "message:%3C" & message id of theMessage & "%3E"
set theSubject to the subject of theMessage & " (From " & the sender of theMessage & ")"
tell application "Reminders"
set theList to list "Inbox"
set newToDo to make new reminder with properties {name:theSubject, body:theBody, container:theList}
end tell
end using terms from
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment