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 09:17:53PM
This is a great tip! Thanks, "WG" (and thanks for emailing me directly, too). At first, I had problems with the AppleScript created out of that Perl script. Essentially:

tell application "Mail"
	set newMessage to make new outgoing message
	tell newMessage
		set subject to "invisible"
		set content to "hello"
		make new to recipient at end of to recipients with properties {address:"foo@bar.com"}
		set visible to false
	end tell
	send newMessage
end tell
Turns out that I had an old "Classic" app laying around in a half dozen places called "Mail", and AppleScript insisted on trying to send these commands to that app (needless to say, that failed miserably).

So, if anyone else is having problems with WG's Perl script, make sure "Mail" is really Apple's Mail.app.

Now, I'm going to work on getting this talk to Entourage! If it works, I'll post it....

[ Reply to This | # ]