Skip to content

Instantly share code, notes, and snippets.

@LunaCodeGirl
Created September 18, 2013 05:09
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 LunaCodeGirl/6604802 to your computer and use it in GitHub Desktop.
Save LunaCodeGirl/6604802 to your computer and use it in GitHub Desktop.
A script for using in Redhand to email a photo to you when someone uses the wrong password. From http://www.soma-zone.com/RedHand/a/scripts.html
on run image
set recipientName to "Joe User"
set recipientAddress to "joe.user@mac.com"
set theSubject to "Intrusion Attempt"
set theContent to "RedHand detected an intrusion attempt: " & image
set img to POSIX path of image
tell application "Mail"
set theMessage to make new outgoing message with properties
{subject:theSubject, content:theContent, visible:true}
tell content of theMessage
make new attachment with properties {file name:img} at after last paragraph
end tell
tell theMessage
make new to recipient with properties {name:recipientName, address:recipientAddress}
send
end tell
end tell
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment