0

I'm trying to write a script for someone in Email for Google Apps, and I thought I knew how folders worked in it. (Every email was in the inbox, and other folders were just filters looking at the inbox.) But this person's Gmail has emails in his folders without the [inbox] label.

Can someone explain to me how that's possible, and how Gmail folders really work?

0

1 Answer 1

3

Gmail doesn't have folders. It has labels.

Labels are essentially "tags" that can be applied to a conversation. A conversation can have multiple labels on it. Or none.

"Inbox" is a special label, but it's still just a label. "Archive" removes the "Inbox" label from a conversation. There are other special labels too: "Spam" and "Trash". "All Mail" and "Sent" aren't labels, although they act a bit like them. And, of course, you can create almost as many labels as you want.

You can learn more about labels from Gmail Support.

3
  • Hi, thanks for the information. I have a quick question though, if I use "var threads = GmailApp.getInboxThreads();" in conjunction with " threads[i].moveToTrash();" will that delete "Archive" emails as well? or will it skip over them?
    – WillStark
    Commented Sep 9, 2015 at 22:02
  • Beats me. That's a programming question and, as such, will be off-topic here. Try Stack Overflow. I see quite a few questions there tagged gmail.
    – ale
    Commented Sep 9, 2015 at 22:03
  • I'm being sent all over Stack Exchange, lol. Thanks though, I'll mark your reply as the answer.
    – WillStark
    Commented Sep 9, 2015 at 22:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.