Saturday, November 18, 2017

#1 2016-10-12 03:30:30 pm

zantafio
Member
Registered: 2016-10-12
Posts: 5

cannot delete Mail mailboxes

Using MacOs Sierra, in Mail, I am trying to delete a mailbox, I am always getting the AppleEvent Handler Error 10000, no matter which mailbox, full or empty, local, or IMAP/POP.

Tell application "Mail"
delete mailbox "complaints" from account "ACME LLC"
end tell

This is not an issue with file permissions because I can rename a mailbox without problem.


Filed under: mail sierra

Offline

 

#2 2016-10-13 08:36:56 am

Rob Sternberger
Member
From:: Tampa
Registered: 2002-11-20
Posts: 91
Website

Re: cannot delete Mail mailboxes

FYI: I have reported several Sierra Mail / AppleScript issues to Apple, including your problem. Hopefully they are being addressed and will be fixed soon.

Offline

 

#3 2016-12-03 08:54:01 pm

zantafio
Member
Registered: 2016-10-12
Posts: 5

Re: cannot delete Mail mailboxes

Still not fixed in the last update.

Offline

 

#4 2017-06-21 11:34:15 am

zantafio
Member
Registered: 2016-10-12
Posts: 5

Re: cannot delete Mail mailboxes

Can anyone with a beta of High Sierra confirm is this bug has been fixed or not?

Offline

 

#5 2017-06-22 05:05:55 am

Yvan Koenig
Member
Registered: 2006-09-14
Posts: 3201

Re: cannot delete Mail mailboxes

No change with High Sierra.

Have you ever tried to get properties of every mailbox ?
If you do that you will see that the property account of every mailbox is set to missing value.
At this time we must identify accounts by their id.

Applescript:

tell application "Mail"
   properties of mailbox "aaa"
   --> {account:missing value, name:"aaa", container:account id "30ACBF46-881C-40AC-B33B-500D53832270" of application "Mail", class:container, unread count:0}
   properties of every mailbox whose name is "douteux"
   --> {{account:missing value, name:"douteux", container:mailbox "aaa" of application "Mail", class:container, unread count:0}}
   properties of mailbox "Batiactu…"
   --> {account:missing value, name:"Batiactu…", container:account id "30ACBF46-881C-40AC-B33B-500D53832270" of application "Mail", class:container, unread count:0}
end tell

Yvan KOENIG running Sierra 10.12.5 in French (VALLAURIS, France) jeudi 22 juin 2017 12:05:48

Offline

 

#6 2017-07-06 02:49:54 pm

zantafio
Member
Registered: 2016-10-12
Posts: 5

Re: cannot delete Mail mailboxes

I fail to see the relevance to this issue. Enlight me please.

Offline

 

#7 2017-07-06 03:19:32 pm

zantafio
Member
Registered: 2016-10-12
Posts: 5

Re: cannot delete Mail mailboxes

Yvan Koenig wrote:

No change with High Sierra.

Have you ever tried to get properties of every mailbox ?
If you do that you will see that the property account of every mailbox is set to missing value.
At this time we must identify accounts by their id.

Applescript:

tell application "Mail"
   properties of mailbox "aaa"
   --> {account:missing value, name:"aaa", container:account id "30ACBF46-881C-40AC-B33B-500D53832270" of application "Mail", class:container, unread count:0}
   properties of every mailbox whose name is "douteux"
   --> {{account:missing value, name:"douteux", container:mailbox "aaa" of application "Mail", class:container, unread count:0}}
   properties of mailbox "Batiactu…"
   --> {account:missing value, name:"Batiactu…", container:account id "30ACBF46-881C-40AC-B33B-500D53832270" of application "Mail", class:container, unread count:0}
end tell

Yvan KOENIG running Sierra 10.12.5 in French (VALLAURIS, France) jeudi 22 juin 2017 12:05:48


true, but that does not prevent me to successfully execute :

tell application "Mail"
    count messages of mailbox "brother" of account "zantafio"
end tell

furthermore referencing the mailbox using account ID, I am still unable to delete the mailbox.


tell application "Mail"
    delete mailbox "brother" of first item of (accounts whose id is "94A311A3-88DD-4A52-B6F6-00223E540025")
end tell

Result:
error "Mail got an error: AppleEvent handler failed." number -10000

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)