• 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
Osx Mail : Deleting Maiboxes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Osx Mail : Deleting Maiboxes


  • Subject: Osx Mail : Deleting Maiboxes
  • From: "email@hidden" <email@hidden>
  • Date: Tue, 07 May 2019 21:14:14 +1000

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

  • Follow-Ups:
    • Re: Osx Mail : Deleting Maiboxes
      • From: Takaaki Naganoya <email@hidden>
    • Re: Osx Mail : Deleting Maiboxes
      • From: Takaaki Naganoya <email@hidden>
  • Prev by Date: Re: Changing the time of an event using CalendarLib
  • Next by Date: Re: Osx Mail : Deleting Maiboxes
  • Previous by thread: Re: Changing the time of an event using CalendarLib
  • Next by thread: Re: Osx Mail : Deleting Maiboxes
  • Index(es):
    • Date
    • Thread