• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Scripting Mail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Prev by Date: Re: Unix file path problems
  • Next by Date: Re: Unix file path problems
  • Previous by thread: Scripting Mail
  • Next by thread: Screen Saver
  • Index(es):
    • Date
    • Thread