• 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' from OS X
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scripting 'mail' from OS X


  • Subject: Re: scripting 'mail' from OS X
  • From: email@hidden (Gerd)
  • Date: Mon, 18 Mar 2002 06:57:26 +0100

Hallo cricket,

thanks for your help.

I tried your script as follows:

set c to 1

tell application "Mail"
set theMessage to message c of mailbox "backmails" of account "Personal Mailboxes"
set y to content of theMessage
set c to c + 1
end tell

Each time i run the script "mail" crashes and i get the message:
the program mail unexpectedly stopped .

After this mail starts again and shows the errormessage: Can't get content of themessage.

Do you have any ideas what i can do ?




In Mail, all mailboxes belong to accounts, so that's part of the problem. Also, not everything you're trying to do here is possible in Mail yet, like the opening of messages in the UI or deleting messages. But, this script should work for you:

tell application "Mail"
set theMessage to first message of mailbox "backmails" of account "Personal Mailboxes"
set y to content of theMessage
end tell

This will set y to the content of the first message in this particular mailbox.

Are there anywhere samplescripts how to work with 'mail' ?

There are some samples scripts on your boot volume here:

/Applications/AppleScript/Example Scripts/Mail

Of course i found them, but there are only two examples, without any example how to delete, open or handle single messages.
Do you know whether in future in will be possible to do this with "mail" ?

Thanks for any help.

Gerd
_______________________________________________
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.

  • Follow-Ups:
    • Re: scripting 'mail' from OS X
      • From: Cornwall <email@hidden>
References: 
 >Re: scripting 'mail' from OS X (From: cricket <email@hidden>)

  • Prev by Date: Re: Try these
  • Next by Date: Re: scripting 'mail' from OS X
  • Previous by thread: Re: scripting 'mail' from OS X
  • Next by thread: Re: scripting 'mail' from OS X
  • Index(es):
    • Date
    • Thread