Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleSelect INBOX command - also tells us what the highest ID mail that we can request

Notice line Line 8 tells us we have successfully selected the INBOX.

Line 4 also tells us the highest ID mail which exists is 82838.

Code Block
* FLAGS (\Answered \Flagged \Draft \Deleted \Seen $NotPhishing $Phishing)
* OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen $NotPhishing $Phishing \*)] Flags permitted.
* OK [UIDVALIDITY 1] UIDs valid.
* 82838 EXISTS
* 0 RECENT
* OK [UIDNEXT 84128] Predicted next UID.
* OK [HIGHESTMODSEQ 8669111]
a02 OK [READ-WRITE] INBOX selected. (Success)
Expand
titleFetch an email

Here is a sample of an IMAP Fetch response:

Note we can clearly see the header, body, and success response all separated by a boundry (001a113da73205a6ea056272f2ab). We can use this boundary to help parse the email and isolate its parts.

Code Block
* 1 FETCH (BODY[] {4835}
MIME-Version: 1.0
x-no-auto-attachment: 1
Received: by 10.25.43.137; Wed, 10 Jan 2018 13:45:09 -0800 (PST)
Date: Wed, 10 Jan 2018 13:45:09 -0800
Message-ID: <CAP14fq11RQ3+xEZk7uSmWb4rv1oEDdX66fuq7wJJbkxFv+u1fA@mail.gmail.com>
Subject: Hey!
From: real.person@gmail.com;
To: Aryn Wiebe <aryn.wiebe@interfaceware.com>
Content-Type: multipart/alternative; boundary="001a113da73205a6ea056272f2ab"

--001a113da73205a6ea056272f2ab
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi Aryn

This is a sample email! 

Thanks, 

--001a113da73205a6ea056272f2ab
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html>
...

--001a113da73205a6ea056272f2ab--)
a03 OK Success
Expand
titleWhat other commands are possible - Chat GPT is helpful resource here

Lot’s of commands are possible like getting a summary of an email (can be helpful to avoid loading a very big email).

You can delete emails.

You can probably filter on them. Ask Chat GPT - it knows a lot about IMAP

...