I have spent hours messing around with this using mostly Ai. My wife’s user account on my iMac has hundreds of Trash on My Mac emails, 687 today. It keeps filling up daily. I can not get a script to work that I can use in the Calendar to auto delete Trash on My Mac emails older than 2 days or at all. All the scripts show results deleted but nothing is ever deleted from the actual Mail Box. I was able to get a script to work on the admin account, but not on a user account. It seems to me it should not be so difficult. Anyone help me here. Thank you,
To erase deleted items in all accounts, it is shift+cmd+delete on a U.S. Mac extended keyboard. To do the same thing for all Junk emails, it is option+cmd+J.
I don’t write scripts to fiddle with email and certainly would not trust coding information gleaned from AI sources. Those two keyboard shortcuts serve me just fine.
More importantly, you need to track down why you are accumulating all of those Trash on your Mac emails and potentially resolve it at the source without writing code.