Osx Mail : Deleting Maiboxes
Osx Mail : Deleting Maiboxes
Hi
I had this for some time working
tell application "Mail"
-- deleteMailBox v1.03 • 03 Aug 2013
if exists (mailbox mailBoxName of mailbox thismailFolder) then
set boxExists to true
try
-- format for mailbox sub-mailboxes is to name the
hierarchy using "/"s as delimeter
set mbxContainer to thismailFolder & "/" & mailBoxName
as string
delete mailbox mbxContainer
on error
display alert ¬
"Cannot delete mailbox (Mail)" message "Check
mailbox name <" & mailBoxName & ">" & ¬
" in category <" & thismailFolder & ">" buttons
{"Cancel"} default button "Cancel"
end try
else
display dialog "Mailbox <" & mailBoxName & "> " & return & ¬
"does not exists in mail folder " & ¬
"<" & thismailFolder & "> " buttons {"Continue"}
default button "Continue"
end if
end tell
I tried this, but also failed
delete (mailbox mailBoxName of mailbox thismailFolder)
but it now fails to delete the mail box
any suggestions?
regards
John
CQR Pty Ltd
Email: email@hidden <mailto:email@hidden> • Mob: +61
410 318 131
_______________________________________________
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