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

Re: Osx Mail : Deleting Maiboxes


  • Subject: Re: Osx Mail : Deleting Maiboxes
  • From: Takaaki Naganoya <email@hidden>
  • Date: Wed, 08 May 2019 12:46:25 +0900

Hi,

I think it is the normal behavior of Mail.app, now.
So, we have to convert a mailbox object reference to a path type string.

You’d better to use my conversion routine. It works.

http://piyocast.com/as/archives/4874

(Click the URL link which located at the end of program list to try my script.
Don’t copy & paste!)

--
Takaaki Naganoya
email@hidden
http://piyocast.com/as/

> 2019/05/07 20:14、email@hiddenのメール:
>
> 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 • 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




 _______________________________________________
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: 
 >Osx Mail : Deleting Maiboxes (From: "email@hidden" <email@hidden>)

  • Prev by Date: Osx Mail : Deleting Maiboxes
  • Next by Date: Re: Changing the time of an event using CalendarLib
  • Previous by thread: Osx Mail : Deleting Maiboxes
  • Next by thread: Re: Osx Mail : Deleting Maiboxes
  • Index(es):
    • Date
    • Thread