Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Create Mail messages with attachments from Terminal' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create Mail messages with attachments from Terminal
Authored by: hypert on Oct 13, '04 11:21:27PM
I figured out (i.e., Googled and hacked my way toward) a simple Applescript for sending mail through Entourage.

tell application "Microsoft Entourage"
	--set newMsg to make new outgoing message with properties {recipient:{recipient type:to recipient, address:"foo@bar.com"}}
	set newMsg to make new outgoing message with properties {to recipients:"foo1@bar.com, foo2@bar.com"}
	set the subject of newMsg to "send mail through Entourage using AppleScript"
	set the content of newMsg to "line 1\nline 2"
	send newMsg
end tell

This could easily be inserted into the original Perl script (I'll hack it in later), but doesn't have all the options of Apple's Mail. I can't find a way to specify CC addresses. In fact, it's kind of complex to specify the TO address (there are two examples above) and apparently has to be done while creating the newMsg object. I've seen online example of being able to set the recipients with a "set" command (like the subject and content), but it simply wouldn't work for me.

I'd welcome any comments to this Entourage AppleScript.

[ Reply to This | # ]