I'm running OS X El Capitan, and have 3 Gmail accounts signed into it. For some reason, the Erase Junk Mail menu option is greyed out. How can I use this option?
Go to mail>preferences>junk mail>under
when junk mail arrives make sure options #2
move it to the Junk mailbox is selected and this should fix your problem immediately.
Let me know if you need any help, this is what worked for me after I let my junk mail build up to over 600, which was killing me, I can understand you want it gone! Should look like this:
It looks like this option is disabled when Apple Mail is set to its default Junk settings.
One of the option groups in the settings panel for Junk is
When junk mail arrives. By default it is set to
Mark as junk mail, but leave in my inbox.
Changing this to
Move it to the Junk mailbox activates the menu item you refer to.