Re: Scripting Mail
Re: Scripting Mail
- Subject: Re: Scripting Mail
- From: Tom Robinson <email@hidden>
- Date: Tue, 29 Jun 2004 20:37:17 +1200
On 29 Jun 2004, at 08:23, Andersen Studley <email@hidden>
wrote:
Are there any examples I've missed that do (something close to) any
part of this?
Sure. Check Mail's sample AppleScripts, specifically, under Rule
Actions.
Here's some extracts from a script of mine which saves messages.
using terms from application "Mail"
on perform mail action with messages theMessages
repeat with ThisMessage in theMessages
tell application "Mail"
set TheContent to content of ThisMessage
set TheSender to sender of ThisMessage
set TheSubject to subject of ThisMessage end tell
set outputFile to open for access file xxx with write permission
write TheContent to outputFile
close access outputFile
end
end
end
The write command can also append information to a file. It's found in
Standard Additions.
Cheers
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.