Where is the archive folder in gmail. How to Recover Deleted (or Archived) Emails in Gmail

The other day I was faced with the following question: how to save a letter from an email? Gmail on computer? I was looking for various ways solution to this problem, in the end I found one that is more or less effective. It will be discussed below.

Why am I puzzled by this question? It was just asked to me by an employee from my work. The wording was something like this: “Anatoly, I can save the letter from Outlook mail to your computer. How can I do the same with an email in Gmail?

And I started looking for the answer. As far as I understand, previously in Gmail it was possible to save a letter in the format Microsoft Word, but now I have not found such a function. It was turned on in the mail settings on the “Lab” tab, and the letters were saved as follows:

The second way to save a letter from Gmail to your computer is even easier. To save a letter, we open it and look for a button with a triangle pointing downwards (the button is located at the top right next to the arrow), and from the drop-down menu we select the “Print” button.

The usual printing window will open, we see the inscription “Printer” on the left and click the “Change” button under it. We need to select the “Save as PDF” option. After that, click the “Save” button and select the folder on our computer where this file will be saved. We will receive a regular PDF file with the text from our letter.

  • MongoDB
  • I began to notice that out of 15 gigabytes free place, provided by Google, my mail already takes up almost 12 gigabytes. And this trend does not make me happy.
    On the other hand, I use Thunderbird with full synchronization as an email client. Those. all letters must be downloaded. So the Thunderbird folder with all the letters and indexes takes up only 3 gigabytes. Although, logically, the size should not just more or less coincide with busy place on GMail, but there should be more, because Thunderbird does not archive messages, but stores them as they are and also builds indexes to speed up searches.
    The problem is obvious! Let's start getting to the bottom of this.

    I started by going to the shortcut (yes, in the case of GMail it is correct to say the shortcut, not the folder, details) “All mail” and saw that I had a little more than 500 thousand messages. The situation was complicated by the fact that I have about 100 labels! And shortcuts in GMail are typical folders in Thunderbird. I haven’t found a way to quickly calculate the total number of emails in Thunderbird. But looking ahead, I will say that I have about 200 thousand of them in it. From here it becomes clear why less space is taken up on the disk.
    But the same question still remains: what are these 300 thousand messages in GMail that are not visible in Thunderbird, but take up space on GMail?

    An inquisitive mind + the desire to stay awake at night + the desire to test Go on a real problem led me to the decision that I needed to take the Go compiler, study the GMail API and see what was under the hood of GMail.

    Briefly about my impressions of Go

    Only the laziest did not write about error handling in Go. They were the only ones I paid more attention to.
    Otherwise:

    • Started writing the next evening
    • Another language
    • Life will force me - I’ll write in Go too
    • For me, C/C++, Python, Java (and PHP too) are also languages ​​for their own niches
    • I guess I'm just an omnivore
    And the article is not about Go.

    As I noted above, I have about a hundred shortcuts. Letters usually have one label. And I wanted to find out how many letters I have marked with each label and how much space they take up in total.
    I have not found a way to find out the size of labels in the GMail web interface (the volume of letters marked with a particular label).
    I rolled up my sleeves, installed the Go compiler, raised MongoDB in a Docker container (Yes, I’m such a pervert! But this is my pet project and I use whatever I want, especially for educational purposes) and began to create shitty code.
    Further I will refer to this project of mine.
    I take all my labels from GMail and add them to the Users.labels: list database:
    GMailMessagesSize -importLabels -mongoConnectionString 10.211.55.5 Imported labels: 112
    I take the IDs of all messages that are in the Users.messages: list box:
    GMailMessagesSize -mongoConnectionString 10.211.55.5 -importMessages Processed 100 messages Processed 200 messages Processed 300 messages ....... Processed 523100 messages Processed 523115 messages
    Of course, it’s not fast, but I couldn’t find a way to parallelize it (the API doesn’t allow it).
    For now we only have a list of message IDs, but we need to know its labels and size for each message. There is a method for this called Users.messages: get . But it doesn’t process quickly, even though in the request I indicate which fields I’m interested in (internalDate, labelIds, sizeEstimate).
    I couldn't find the implementation of Batching Requests.
    But I write in Go and it would be a shame not to use goroutines! No sooner said than done. We pull the information into the number of threads (as many as we want, but I set a limit of 50). If the Internet is fast and the computer does not slow down, then we quickly begin to run into the request rate limit from Google. The script can be stopped and continued, or you can just wait stubbornly, because... When the limit is triggered, the goroutines sleep for 5 seconds and then continue to torment Google. Yes, it would be possible to increase the sleep time each time, for example, twice and not forget about the restriction from above. But in this case, a simple 5 seconds is quite a solution.
    I processed my 500 thousand letters in total, it seems, in about 3 hours. In general, the time is sane.
    GMailMessagesSize -mongoConnectionString 10.211.55.5 -processMessages -procNum 20 ........................Procecced 100 messages ........ ....................Procecced 200 messages ............................... .Procecced 300 messages .... ............................Processed 523100 messages ........... .............Processed 523115 messages
    Not only dots popped up there. If you hit the limit, then instead of the point S (sleep) or maybe the message has already been deleted, then NF (NotFound).
    As a result of all the above suffering, MongoDB has a collection of labels and a collection of messages:
    ( "SizeEstimate" : NumberLong(63422), "_id" : ObjectId("5677188d2afd90a80e5e06f2"), "id" : "136b83b1ff739dec", "internaldate" : ISODate("2012-04-15T22:47:51.000+0000"), "labelids" : [ "CATEGORY_PROMOTIONS" ], "processed" : true )
    Now you have all the data at hand to start analyzing it.
    First I decided to export to CSV information by labels, number of messages and their total size.
    GMailMessagesSize -mongoConnectionString 10.211.55.5 -showSizes LabelId;Label name;Messages size;Messages count Label_11;Archives;21279;4 Label_12;Archives/2012;18684;3 CATEGORY_FORUMS;CATEGORY_FORUMS;519396295;30038 CATEGO RY_PERSONAL;CATEGORY_PERSONAL;5040188875;268116 CATEGORY_PROMOTIONS; CATEGORY_PROMOTIONS;2990655727;36508 CATEGORY_SOCIAL;CATEGORY_SOCIAL;205976374;6553 CATEGORY_UPDATES;CATEGORY_UPDATES;2769764066;180729 CHAT;CHAT;0;0 DRAFT;DRAFT;82817;6 ANT;IMPORTANT;6600492209;159268 INBOX;INBOX;40306538;334 UNREAD;UNREAD ;479586429;11678 ..... Label_97;INBOX/Coursera;6021524;151 Label_77;INBOX/Temporary;1077571;28 Label_63;INBOX/Reply!!!;6195999;12 Label_67;INBOX/Trip to the USA;1693366;11
    This is a CSV that I found convenient to open in Excel and study (sort and filter).


    And at this stage I started thinking seriously. What is 6 gigs of some important (labeled IMPORTANT) messages? What is 11678 unread messages(with the UNREAD label)? I (as I thought) had all my messages read! Even if you enter label:unread in the GMail search bar, it displays only 106 unread messages! What's happening?

    Googling this situation led to forums where others wondered why the deleted Thunderbird messages are not deleted in GMail? Well there's a lot different cases. I'll tell you about what I think is the saddest thing.

    At this point, those who use GMail exclusively in a browser may regret that they started reading this article. BUT!!! You may also be reading mail from a mobile phone. And perhaps you don’t have a native one there GMail client. In that case, you may have the same problem as me!

    1. A letter arrives in GMail
    2. The message is assigned the labels INBOX, UNREAD and ( this is where it matters) perhaps some additional label, for example CATEGORY_PROMOTIONS
    3. You have opened a letter in your email client. The UNREAD label has been removed.
    4. You deleted a letter in your email client
    5. Drum roll: the INBOX label has been removed. And... that's it, nothing more
    6. The message still has the label CATEGORY_PROMOTIONS
    Messages with the CATEGORY_PROMOTIONS label are displayed if you type in the search: category:promotions Do you often do this?
    To put it very briefly, the letters are simply not deleted! I delete them, but they remain on GMail.
    Now is the time to remember about archiving letters. And it looks like this is the case!
    When deletion is configured in Thunderbird via “Mark for deletion”, then “Compress”:


    And what is worth putting in the cart:


    It's happening STILL archiving!
    Bottom line: the letters go into the archives. And from the point of view of GMail, an archive is letters that do not have visible labels and have not been in the trash.
    On the one hand, it's okay. But letters can always be found through search.
    What if I don't want it that way? What should I do now?
    How to find and delete all messages from the archive? That's a good answer. But for some reason I didn’t dare to delete everything at once like that.
    By the way, in the search bar I still haven't found a way to show messages that only have one specific label. Those. for example, I decided to delete all posts that have the label CATEGORY_PROMOTIONS and no other. I definitely don’t need these advertising letters in the archive. By the way, how many of them are there?
    GMailMessagesSize -mongoConnectionString 10.211.55.5 -showSizes -l CATEGORY_PROMOTIONS -onlyThisLabel LabelId;Label name;Messages size;Messages count CATEGORY_PROMOTIONS;CATEGORY_PROMOTIONS;1197364170;14618
    I have a gigabyte worth of them there.
    -onlyThisLabel is an important option that allows you to find only those messages that have this single label.
    GMailMessagesSize -mongoConnectionString 10.211.55.5 -showSizes -l CATEGORY_PROMOTIONS -l IMPORTANT -onlyThisLabel LabelId;Label name;Messages size;Messages count CATEGORY_PROMOTIONS;CATEGORY_PROMOTIONS;1197364170;14618
    Yes, I have another gigabyte and a half of “important advertising” messages :) Please note that this is in addition to just a gigabyte of unimportant advertising.
    My hands immediately itched to remove it all!
    GMailMessagesSize -mongoConnectionString 10.211.55.5 -deleteMessages -l CATEGORY_PROMOTIONS -l IMPORTANT -onlyThisLabel -procNum 10
    In fact, the letters are not deleted, but placed in the trash. There, after 30 days, they will either be completely removed, or you can go and manually clean them yourself.

    TOTAL: If you delete messages not through the GMail Web interface, but through third party client(possibly mobile), that is, it is likely that your messages are not deleted, but archived. For some this is even good. And for some, this leads to the box simply swelling indecently.
    And it's not even about 2 bucks a month. You can eat 100 gigs and more. I just wanted to get to the bottom of the issue.

    ATTENTION!!! The project was written personally for myself. This is my first Go program. I am not responsible for the safety of your letters! But if you do not use the -deleteMessages option, then nothing will happen to your mailbox.

    Only registered users can participate in the survey. Come in, please.

    The previous article was devoted to deleting and restoring messages. But what if there is a letter, for example, with the sender’s contact information, and this information may be needed in the future? Leaving a message in your Inbox doesn’t make sense or you don’t want to, but you can’t delete the letter either. In this case it is convenient archive letters. Messages seem to be put away in a “distant box”. In which, if you wish, you can always find them, but at the same time they no longer appear in the “Inbox” folder without distracting your attention.

    Let's consider technical points this procedure.

    Manual message archiving

    You can archive it as individual messages, and entire groups of letters. To do this you need:

    1. In the “Inbox” folder, mark the letters that you want to archive.
      For single messages, check the box on the left.
      To select a series of messages combined common feature, use filters (read about filters) and click the “Select” button.

    Click on the "Archive" button.

    Processed emails will disappear from your inbox, but you can still access them.

    Automatic archiving

    How can I find an archived message?

    We have archived the letter. A year passed, and then we urgently needed to see what was in that very message. What to do?

    1. Go to the “More – All Mail” section.
    2. We find the required letter in the list. To do this, you can use a filter.
      I suggest using advanced search operators and inserting the following expression into the search bar: “has:nouserlabels -label:inbox -label:trash -label:spam”. It means that you need to show all messages without custom labels, excluding messages from the Inbox, Trash, and Spam folders. Thus, we will see only those letters that are in the archive.
    3. Messages in the archive can be viewed, deleted, marked, etc.

    How to extract a letter from the archive?

    Working with messages in the archive is no different from working with other messages. But if you decide to restore an archived email in your inbox, there is nothing complicated about it. All you need to do is follow a few simple steps:

    1. Go to the “More – All Mail” section.
    2. Find the letter as described above. Flag the message using the checkbox on the left.
    3. Click the “Add to Inbox” button.

    After a recent accident at my school, when due to damage to a raid on the server, a lot of important information, I seriously wondered how safe my favorite place storage - Gmail?
    On the one hand, by storing important documents in the “cloud” online, I protected myself from disk failures, viruses, and other evil spirits (I expect that Google specialists are qualified enough to deal with these troubles).
    On the other hand, no one is immune from hacking of a mailbox or its elementary “stealing” by changing the password. And - it’s scary to think - if my Gmail mailbox is hacked, I could lose everything I’ve acquired over the past few years! IN Lately I often receive emails from colleagues saying that their email has been hacked. Of course, in most cases, hacking a mailbox becomes possible solely due to the carelessness of its owner (usually this is done through phishing - showing a fake page similar to the real one, where you need to enter a password), but where is the guarantee that when testing hundreds of new services that I do Every day, isn't there one very well disguised thief?

    To protect yourself from such a development of the situation, you need to make a backup.

    By the way, backup has one more advantage, which is not at all obvious. All emails are saved in backup, including those I deleted from my main account. That is, if I accidentally delete some important letter, I can always find it in my backup.

    Well, one more thing - if Gmail is down (this, although very rare, still happens) - you can always view your letters and send new ones.
    There are two ways to create a backup - create a backup on your local computer or keep it online.
    The easiest way to keep Gmail on your computer is to set up mail client- such as Thunderbird or Microsoft Outlook. There is a more convenient solution - yu This is a utility that can not only take a snapshot of the mail archive on the backup date, but also add new letters to it as they arrive.
    However, I really didn’t want to keep a multi-gigabyte archive on my local disk. In addition, the downloaded archive is very inconvenient to read later - it is precisely an archive intended for storage, and not for working with it.

    And this is the method I discovered for myself.

    Gmail itself will help you save your Gmail mail

    What's stopping you from creating another Gmail account and copying mail from the main one to it?

    Nothing. You only need to enable access to your main mailbox via POP3 and configure mail collection via POP3 on the backup one mailbox

    Create a new account Gmail entry and in the Settings menu -> Accounts and import -> Collecting mail from other accounts -> Add account POP3 Email, enter your primary email address Gmail account, backup copy which you want to create.

    Within an hour or so, online will “pull” messages from your main Gmail account and copy them to a new “backup” account.

    Be careful when setting this method. When collecting mail, do not forget to check the box "

    Honestly, after two unsuccessful attempts, I gave up hope of setting up this method of Gmail backup? although, probably, it was possible to play around with IMAP or other servers.

    But why if

    Gmail will be saved by his worst friend Microsoft.

    Microsoft offers its users free Windows mail Live Hotmail. According to its functionality and volume available for storage Hotmail comparable to Gmail. But most importantly, creating a backup in Hotmail goes without a hitch.

    While you can add Gmail mail collector to your Hotmail account using POP3 (exactly the same as Gmail mail collector), there is a much better and more reliable option for copying Gmail emails in Hotmail. This is a service called .

    Simply provide this service with the passwords for both of your mailboxes, and it will immediately begin copying.

    Of course, the fact that in this case you need to give to a third party service your password from the most sacred thing is a little annoying. One thing is reassuring: data transfer takes place over a verified secure connection, and the service itself is provided by a reputable company with an office in New York.

    When backing up, all emails, including attachments and tags, are copied to home page The user is specifically reassured that not a single letter from the old mailbox will be lost. This makes me happy.

    My three-gigabyte archive was copied for about a day. At the end, I received a letter saying everything was ready. It's a small thing, but nice.


    All Gmail labels imported perfectly and turned into Hotmail folders. The status of letters has not changed - those that were unread on Gmail remained unread on Hotmail.

    I would like to draw your attention to one little detail that is very important. By default, when importing, the questionnaire contains the checkbox “Tell your contacts about your Hotmail address.”

    This is necessary if you change Gmail address on Live.Hotmail. If you are going to continue working with Gmail, and use Hotmail only as an archive, you need to uncheck this box. I generally have a very negative attitude towards such things. automatic mailings throughout address book. Normal reaction of a person who receives something generated by a robot automatic letter, even if it’s from a familiar recipient - send it to spam without reading it.

    Gmail has a ton of tricks, tips, and extensions that make the experience of using this mailer unique. new level. Deleting misdirected mail, hotkeys, transferring money through an email account - knowledge of such techniques will turn you into one of the most advanced users of the service.

    Canceling an erroneous email sending

    Sending a letter to the wrong address can have serious consequences. Luckily, you can now fix this error in Gmail. First, enable the Undo Send feature. To do this, go to the “Settings” menu by clicking on the gear image in the right top corner your mail account. Then, under the “Undo Send” section, check the “Enable Undo Send” checkbox. Specify the time period during which you want to have this option in the “Time period for canceling sending” drop-down list. Most importantly, don’t forget to click on the “Save Changes” button at the bottom of the page.

    It turns out that to work with letters in Gmail inbox, you don't have to be online. The “Gmail Offline” browser extension for Chrome allows you to read and reply to messages, search and archive the necessary correspondence without access to the Internet.

    However, to take advantage of “Gmail Offline”, the extension must be installed with an active Internet connection. Go to the already familiar “Settings” menu, select the “Offline” tab there and make the installation. In a few minutes, the extension will synchronize and download your emails, so that the lack of Internet does not interfere with your work with email.

    Using Hot Keys

    To save time, use hotkeys. Again, go to “Settings” and in the “General” tab enable this function. Now you can rummage through your drawer without touching the “mouse”. Here are the most necessary and most often used combinations:

    • “J”—go to older messages
    • “K”—go to new messages
    • “E” - archive
    • “Shift”+3 — delete
    • “A” - answer everyone
    • “R”—reply personally

    Scheduler for sending emails

    Maybe you don't want to send an email late at night or are afraid you'll forget to do it in the morning. The Boomerang extension for Chrome will help you schedule a pre-prepared email to be sent and remind you about pending mail.

    Deleting emails that take up a lot of space

    Gmail gives each user a free 15 GB for storing mail, photos for Google+ and files on Google Drive. But sooner or later this luxury ends. Instead of going through your mailbox and Google Drive looking for old unnecessary letters and documents for the sake of free 5-6 MB, go through the letters that take up the most space.

    Write on the line Gmail search“size:[Х]m”, specifying instead of [X] the size of the letter in megabytes, and you will receive a list of all your letters whose volume exceeds set value. Be careful - search query must be entered together with quotes.

    Unsubscribe from mailing lists

    Tired of mailing lists, which were subscribed to in the last century? There is a simple and quick way unsubscribe from mailings that have become useless garbage in the mail. In the header of one of these emails, click “Unsubscribe from messages from this sender.” Now this author will not bother you with his messages.

    To prevent important emails from going unread, do a little reorganization of your inbox. Go to “Settings” to the “Inbox” tab, then from the “Inbox type” drop-down menu, select “Unread first”. This way you will see incoming unread emails first.

    Setting up filters

    If you receive a lot of emails from online stores or mailing services and don’t want to miss profitable offer, There is good way filter necessary messages. Click on the small arrow on the right in the search bar. A window will appear in which you need to enter conditions for filtering letters (by subject, sender, recipient, etc.).

    By indicating required parameters, click in the lower right corner of the window on “Create a filter according to this request.” You will have many options like “Never send to spam”, “Always mark as important” and so on. By checking the “Apply filter to matching email threads” checkbox at the bottom, you will apply these actions to all messages that meet the specified parameters.

    Sending emails from different addresses

    Did you know you can send emails from different addresses without leaving your Gmail account? To do this, go to the “Settings” menu, go to the “Accounts and Import” tab and in the “Send emails as” section, click on “Add another email address”. A new window will open allowing you to connect a different email address to your Gmail account.

    Personal letter icons

    To find out if the letter was addressed only to you or mass mailing on the list of mailboxes, enable the “Personal mail icons” function. To do this, in the “Settings” menu, select the “General” tab, then in the “Personal email icons” section, select “Enable”.

    Now in your inbox you will see an arrow next to messages sent with you to other recipients, and double arrow next to messages that are addressed only to you. There are no arrows at all near mailing letters.

    If you don’t want to respond to an email right away, but are afraid that you will forget to write a response later, use the “Tasks” list. To add a letter reminder to “Tasks”, select incoming message, which you need to answer, then click the “More” button above it and select “Add to tasks”. To check if this task has appeared in the list, go to the drop-down menu in the upper left corner above your inbox. When you select “Tasks” you will see a list of current tasks.

    Import from other email accounts

    There is a very simple way to collect all letters and contacts in one mail account. Go to the already familiar “Settings” menu and select the “Accounts and Import” tab there. In the “Import mail and accounts” section, click on “Import mail and contacts”. A new window will open with instructions that will help you collect all your mail and contacts in one Gmail account in a matter of minutes.

    Pre-prepared messages

    If you often have to respond to emails with the same phrases, the “Response Templates” function will come in handy. It allows you to add message templates to your personal library and send them to recipients with one click. To configure the function, go to the “Lab” tab of the “Settings” menu, then in the search bar experimental function search for “Templates”. Enable the found function and do not forget to save your changes.

    Now create a response template. In the lower right corner of the window with a new message, click on the arrow, select “Reply templates” and “Create a ready-made response” from the drop-down menu. Enter the name of the ready answer in the window that appears. Now, when replying to any email, you can choose ready-made template reply from the More menu in the lower right corner of the message window.

    Money transfer

    If you're in the US or UK, you can send money with Google. Wallet directly from your Gmail account. Compose a message addressed to your recipient, then click the dollar sign at the bottom of the window. A Google Wallet service window will open in which you need to indicate the amount to be sent. Not to send, but to request remittance, instead of the “Send funds” tab, select “Submit a transfer request”.

    If you don't have Google Wallet, the first time you transfer funds you will be prompted to set it up. Of course, your recipient or sender must also have this service configured.

    Automatic archiving of sent emails

    If you want to keep your inbox organized without deleting old messages, use the message archiving feature. Sent emails can be archived automatically using the “Send and Archive” function. It is enabled on the “General” tab in the “Settings” menu, in the “Sending and Archiving” section

    Archived emails are stored in the All Mail folder, but if someone replies to you from an archived email, it will appear in your inbox again.

    Backing up emails

    If you are afraid of accidentally losing important letters, attached files and images, Google allows you to create archives of data from any services that are associated with your account. You can archive all mail or select letters with specific labels. For those who do not believe in absolute reliability Google servers, the extension is suitable for Reserve copy Gmvault mail.

    If you do not want to see a certain email chain, check the “Ignore” checkbox. To do this, go to the “More” drop-down menu at the top of the window and click the corresponding button there. You will no longer see the flagged email thread unless you search for it through the search bar.

    Using emoticons in letters

    Emoticons can be added not only to SMS messages. If you want to spice up your chat conversations or make your emails less formal, select the smiley face icon in the chat or new message window. Please note that this feature is only available for the web version of the service.

    Checker Plus for Gmail extension for Chrome browser will send notifications of new emails, and will also allow you to read and delete incoming messages without opening the Gmail page.

    Unauthorized actions on your account

    In a world where online profiles are constantly at risk of being hacked, you need to make sure your account is safe. To make sure that no one but you is messing with your inbox, check your “ Latest activity in the account." This text, in small letters, along with the time when some actions were performed on the account, is displayed in the lower right corner of the screen. By clicking on the link “ Additional Information”, you will open a new window with data about all activities in the current account and active sessions associated with it.

    Hopefully, with these tips, you'll be able to use Gmail much more effectively than before.