1
我希望我的脚本来遍历邮箱的树和删除空邮箱:如何删除邮件的邮箱使用AppleScript
tell application "Mail"
my cleanup(mailbox "Archives")
end tell
on cleanup(box)
tell application "Mail"
if (count of mailboxes of box) > 0 then
repeat with mbx in mailboxes of box
my cleanup(mbx)
end repeat
else
if (count of messages of box) = 0 then delete box
end if
end tell
end cleanup
的“删除框”会导致错误: 错误“的邮件得到了一个错误:将邮箱的每个邮箱的第1项每个邮箱的“第1项”归档“。”从邮箱的每个邮箱的第1项的每个邮箱的项目1号-1728“归档”