Easily Locate Email Messages in Gmail with rfc822msgid
When you send an email through Gmail, a unique Message ID is added to the email header as per the RFC 822 specification. To know the ID of your message, open the email inside Gmail, go to 3-dot menu and choose Show Original. The Message-ID will be displayed in the first line of the header as shown the screenshot.
You’ve sent an important email to a colleague but it is lost in the deluge of emails they receive every day, buried and forgotten. They can obviously use Gmail search operators, like FROM:
or SUBJECT:
, to locate that email later but wouldn’t it be useful if there were a way to directly locate that one missing email in their mailbox.
Well, there’s an alternate search trick and the sender can actually help the recipient find any specific email message that they have sent in the past.
When you send an email through Gmail, a unique Message ID is added to the email header as per the RFC 822 specification. To know the ID of your message, open the email inside Gmail, go to 3-dot menu and choose Show Original. The Message-ID will be displayed in the first line of the header as shown the screenshot.
The Message ID of a particular email message is exactly the same for both the sender and the recipient. That means if the recipient opens the header of your email in their mailbox, the message ID will match that of the message in your Gmail sent folder.
Gmail offers a lesser-known search operator - rfc822msgid
- that helps you search emails by their message ID.
So if our message ID is xyz@mail.gmail.com
, a simple search like rfc8222msgid:xyz@mail.gmail.com
will return the exact email in search results.
And that’s the trick. This search query will work for both the recipient and the email sender. So if you pass the message ID to the recipient, they can simply use the rfc822msgid
operator to locate a specific email from you in their own mailbox.
Since the recipient ID is too complex, you can simply copy of the URL of the Gmail search page and pass them to the recipient. The URL will work for them as well since the Message ID is the same for them as well.
You can also use this search trick to bookmark emails in the browser.
Also see: Send Personalized Emails with Gmail
Amit Agarwal
Google Developer Expert, Google Cloud Champion
Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India.
Amit has developed several popular Google add-ons including Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory