• 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: help scripting apple mail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help scripting apple mail


  • Subject: Re: help scripting apple mail
  • From: Luther Fuller <email@hidden>
  • Date: Fri, 22 Jun 2007 16:51:03 -0500

I'll try. These two scripts may be instructive ... I hope. Play with them.

script 1
tell application "Mail"
	set accList to (every Mac account) -- or just "every account"
	repeat with acc in accList
		name of acc
		display dialog the result as text
	end repeat
end tell

script 2
tell application "Mail"
	set mBoxList to (mailboxes of account "xxxxx") as list
	repeat with mBox in mBoxList
		name of mBox
		display dialog the result as text
	end repeat
end tell

where "xxxxx" is the name of an account. The accounts are obtained from script 1.
The name of any account is the string entered into the "Description:" field in the Account Information tab in the Accounts pane in Mail's Preferences. This string is for the user's use only (you can leave them all empty, if you wish) and does not change the way Mail behaves.


On Jun 22, 2007, at 2:06 PM, Bob Cuilla wrote:

I have three .Mac accounts, Grapes,Oranges and Lemons. I would like to AS the following.

1.	Select account "Lemons"

2.	Build a list that contains the message bodies in that list

For example, if lemons had four emails, whose messages were Green grass, blue skies, yellow daisy and pink panther, respectively, I would like the list to contain

green grass
blue skies
yellow daisy
pink panther

Can anyone give me a kick-start on this?

_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >help scripting apple mail (From: Bob Cuilla <email@hidden>)

  • Prev by Date: Re: POSIX path to file (solved)
  • Next by Date: OSAX to Tokenize Record Field Names from List Items ???
  • Previous by thread: help scripting apple mail
  • Next by thread: Re: help scripting apple mail
  • Index(es):
    • Date
    • Thread