Google Google Script Tricks

Read Gmails Without Opening (Exclusive)

Now you are pretty clear why I have kept such a title for this article. It's a quite new idea which I have thought and implemented, perhaps for the first time in World Wide Web. You can now read your Gmails right from your Yahoo mail (Yahoo is just an example here. But practically you can also read from other mail services).

Do you think, This could be done by email forwarding ?

If you think so, then please have patience and read through the article, if you don't then no problem. Few months before I have written an article about Email forwarding from one email to the other. Now-a-days almost all email services support this feature. Using this option you can automatically forward all incoming emails to another address. But here our requirement is quite different. You may not want all emails to be forwarded from your Gmail to your office email or  sometimes you may want some old emails to be forwarded from your inbox received from a particular address or at-times you may also want only those emails which has been received between two specific dates to be forwarded. Then what to do in such situations ?

When you will really need this

Following are some scenarios when this technique might be useful

  • Generally public emails remain blocked in office environment, so do Gmail. If you need some urgent emails from your Gmail-inbox during the office hour, then this technique will definitely come handy.
  • You are in a cyber cafe and don't want to open your secure Gmail. You want to sign in to another email which is not that important and want to read your Gmail-inbox right from there.

How to make this functional

It will hardly take 5 minutes to make it LIVE and functional.

  • First sign-in to your Gmail and then Make a Copy of this Spreadsheet
  • Goto Tools → Script editor…
  • The script-editor page will open. Go to Resources → All your triggers…
  • A small pop-up will open where you need to create a new trigger.
  • Now create a trigger with following settings as shown in the figure and save it.
  • Now you are almost done. Close the script editor window. (Let the spreadsheet remain open)
  • In the spreadsheet you can find two tabs (i) Whitelisted Emails (ii) Detail History at the bottom of the page.
  • Just you need to provide at least one white-listed email from which you are going to send the request. This has been kept for security purposes as no unknown emails can read your inbox. For example: If you are going to send the request from then mention this email in the whitelisted email column.
    NOTE: An email from an address which is not mentioned in the whitelisted emails will not be considered as a request.
  • Now you are done and the script is fully configured.

How to send a request

To send a request you have to follow a particular format. Following are some examples.

  1. Read last 7 emails from your inbox
    You can read last 'n' emails from your inbox where 'n' can be any integer. Write the following in the subject field of your message and send it to your Gmail. You can write anything(even blank) in the body.
  2. Forward a specific email
    Once you send the command mentioned in 1st example, you will get a list of emails with their corresponding ID. Using that ID you can forward an email from your Gmail. Write the following in the subject field of your message and send it to your Gmail. (Mention the email ID in place of XXXXXX)
  3. Search for a specific email
    You can even search your Gmail inbox without opening Just write a search query in the subject field. For example, if you want to read only those emails sent by in between 1st Feb 2013 to 5th Feb 2013 then wrtite the following in the subject field and send it to your Gmail
  4. Search for emails received from a specific address
    To read only those emails which has been received from, write the following in the subject field and send it to your Gmail.

Similarly you can write all possible queries. To known more about queries in details just refer to this page.

For any help drop a comment.