NOTE:
To learn how to obtain a thread ID, click on How to get thread ID of a Gmail thread.
To get more details about distionction between message id and thread id check Understanding the distinction between Message ID and Thread ID in Gmail

In Gmail, every email has a unique identifier known as the “Message ID”. This identifier is used internally to track and reference specific emails. If you ever need to trace an email or reference it for troubleshooting (e.g., in email delivery issues), the Message ID is invaluable.

When dispatching an email via Gmail, a distinct Message ID gets affixed to the email’s header in accordance with the RFC 822 standard.

The Message ID of a email message is exactly the same for the sender, the recipient, a shared email, and migrated email. This implies that if a recipient accesses an email from a shared label or views the header of your message in their inbox, the Message ID will correspond to that found in your Gmail’s sent folder.

How to find the message ID for an email in Gmail

  1. Open Gmail in a web browser.
  2. Open the specific email you want to find the Message ID for.
  3. Click on the three vertical dots (also known as the “More” button) on the top-right corner of the email pane.
  4. Choose “Show original ” from the dropdown menu.
  5. A new tab or window will open showing the original format of the email, including all headers.
  6. Look for the line that begins with “Message-ID :”.
    The string following this (usually inside < > brackets) is the unique Message ID for that email.

For example, it might look something like this:

Message-ID: <example1234abcd5678@domain.com>

This ID is unique and should not be the same for any two emails, making it a reliable way to reference a specific message.

How to find an email using rfc822msgid operator

A not-so-popular search feature in Gmail is the “rfc822msgid” operator, which aids in locating emails by their Message ID. You can learn more about this search operator in the article How to use a search operator.

For instance, if the message ID of your email is

xyz@mail.gmail.com

inputting a search query like

rfc822msgid:xyz@mail.gmail.com

into the search bar will yield the precise email in the search outcomes.