Skip to content

Instantly share code, notes, and snippets.

@hissain
Created April 27, 2020 23:30
Show Gist options
  • Select an option

  • Save hissain/7dd627aa607d0e65b7a4bb51cd05a805 to your computer and use it in GitHub Desktop.

Select an option

Save hissain/7dd627aa607d0e65b7a4bb51cd05a805 to your computer and use it in GitHub Desktop.
set recipientName to "Hissain Khan"
set recipientAddress to "[email protected]"
set theSubject to "AppleScript Automated Email Sending"
set theContent to "This email was sent using AppleScript! for testing"
tell application "Mail"
set theMessage to make new outgoing message with properties {subject:theSubject, content:theContent, visible:true}
tell theMessage
make new to recipient with properties {name:recipientName, address:recipientAddress}
send
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment