Last active
July 31, 2017 13:03
-
-
Save kthwaite/b8e341a9f68ed156caf07ef503ef3cc8 to your computer and use it in GitHub Desktop.
Create and send an email in Outlook with Applescript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Microsoft Outlook" | |
set theContent to "Mail Content" | |
-- substitute 'plain text content' for 'content' if you don't want to use HTML | |
set theMessage to make new outgoing message with properties {subject:"Mail Subject", content:theContent} | |
make new recipient with properties {email address:{address:"[email protected]"}} at end of to recipients of theMessage | |
-- recipient type can be 'to recipient', 'cc recipient' or 'bcc recipient' | |
make new recipient with properties {email address:{address:"[email protected]"}} at end of cc recipients of theMessage | |
-- optionally open the message instead... | |
-- open theMessage | |
send theMessage | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment