and then delete the Mail.
As to why it happened, Gmail is an IMAP system that compares mail on your Mac with mail on the server.
It then knows what mail you have already got and downloads the mail that you don't have.
Delete mail on your Mac and, at the next exchange of information, the same email gets deleted from the server.
Delete a folder full of mail on your Mac and, shortly thereafter, a folder full of mail gets deleted from the server.
I don't want to receive mail on my MBP, I want to read it on the internet. I don't, except for some attachments, want it downloaded, I don't want it to take up space. I prefer to have gmail store it, and have bought extra space from google for that purpose. I have been using gmail, and gmail exclusively, since 2005.
With Mountain Lion, the Mail system on the Mac appears to have been activated, and drawn down thousands of old messages. They take up about a quarter of my used space, many megs, according to Grand Perspective. I tried deleting one folder in Mail on the MAC. And (though it's still in the trash in Mail) IT WAS DELETED FROM GMAIL.
How can this be? How can I safely delete all this stuff that's in Mail (in Library files) without losing them on the Gmail server? I can't delete Mail - the system says it needs it. I HAVE dismantled the imap and pop pointers to gmail.