• 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: Where does Mail store deleted messages?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Where does Mail store deleted messages?


  • Subject: Re: Where does Mail store deleted messages?
  • From: kai <email@hidden>
  • Date: Fri, 26 Jan 2007 03:49:05 +0000


On 25 Jan 2007, at 23:38, Michael Slomski wrote:

am 25.01.2007 22:59 Uhr, Luther Fuller at email@hidden schrieb:

The answer is: In the user's /Library/Mail/Deleted Messages.mbox/
Messages folder.

[snip]

Here in germany In the user's /Library/Mail/ is an other folder which seems
build from the receiving server type and the username at this server. so in
a short testsetup I've got a folder "email@hidden" in which an folder
"inbox.mbox" and a second folder "Deleted Messages.mbox".

Similar situation here.

Messages deleted from an account mailbox are moved to the trash belonging to that same account. This is located on disk within the account directory - so its path might look something like:

~/Library/Mail/email@hidden/Deleted Messages.mbox/Messages/.

Deleting a message from a generic mailbox causes it to be moved to 'Trash/On My Mac' in Mail, the corresponding disk location of which is:

~/Library/Mail/Mailboxes/Deleted Messages.mbox/Messages/.

So there may be a number of folders containing deleted messages. To locate them, you could try:

----------------

to locate_folder for mBox
	tell application "Mail" to tell mBox
		set n to name
		set p to ".mbox/Messages/"
		tell its account to if exists then
			if account type is not pop then set p to ".imapmbox/Messages/"
			return account directory & "/" & n & p as POSIX file as alias
		end if
	end tell
	POSIX path of (path to library folder from user domain) & ¬
		"Mail/Mailboxes/" & n & p as POSIX file as alias
end locate_folder

tell application "Mail" to set mBox_list to trash mailbox's mailboxes

repeat with mBox in mBox_list
	set mBox's contents to my (locate_folder for mBox)
end repeat

mBox_list

----------------

---
kai


_______________________________________________ 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/mailman//archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Where does Mail store deleted messages?
      • From: Luther Fuller <email@hidden>
References: 
 >Re: Where does Mail store deleted messages? (From: Michael Slomski <email@hidden>)

  • Prev by Date: Re: applescripting the calculator
  • Next by Date: Re: applescripting the calculator
  • Previous by thread: Re: Where does Mail store deleted messages?
  • Next by thread: Re: Where does Mail store deleted messages?
  • Index(es):
    • Date
    • Thread