question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fetching mails received from search() not working

See original GitHub issue
    const imapFetcher = connection.fetch(notSeenMailsUIDs, {
      bodies: '', // '' means fetch all
      // struct: true,
      // envelope: true,
      // markSeen: true,
    });
[IMAP|Debug]: <= '* 16 EXISTS'
[IMAP|Debug]: <= 'IDLE OK IDLE terminated (Success) [THROTTLED]'
[IMAP|Debug]: => 'A6 UID FETCH 196,197,198,199,200,201,202 (X-GM-THRID X-GM-MSGID X-GM-LABELS MODSEQ UID FLAGS INTERNALDATE BODY.PEEK[])'
[IMAP|Debug]: <= '* 9 FETCH (X-GM-THRID 1709166704339021881 X-GM-MSGID 1709167321102384438 X-GM-LABELS ("\\\\Important") UID 196 MODSEQ (27086) INTERNALDATE "26-Aug-2021 14:42:56 +0000" FLAGS () BODY[] {2495584}'
[IMAP|Debug]: <= '* 9 FETCH (X-GM-THRID 1709166704339021881 X-GM-MSGID 1709167321102384438 X-GM-LABELS ("\\\\Important") UID 196 MODSEQ (27086) INTERNALDATE "26-Aug-2021 14:42:56 +0000" FLAGS () )'
[IMAP|Debug]: <= '* 10 FETCH (X-GM-THRID 1709166704339021881 X-GM-MSGID 1709167398629662374 X-GM-LABELS ("\\\\Important") UID 197 MODSEQ (27086) INTERNALDATE "26-Aug-2021 14:44:10 +0000" FLAGS () BODY[] {2514848}'
[IMAP|Debug]: <= '* 10 FETCH (X-GM-THRID 1709166704339021881 X-GM-MSGID 1709167398629662374 X-GM-LABELS ("\\\\Important") UID 197 MODSEQ (27086) INTERNALDATE "26-Aug-2021 14:44:10 +0000" FLAGS () )'
[IMAP|Debug]: <= '* 11 FETCH (X-GM-THRID 1709166704339021881 X-GM-MSGID 1709167472144624896 X-GM-LABELS ("\\\\Important") UID 198 MODSEQ (27086) INTERNALDATE "26-Aug-2021 14:45:20 +0000" FLAGS () BODY[] {2496287}'
[IMAP|Debug]: <= '* 11 FETCH (X-GM-THRID 1709166704339021881 X-GM-MSGID 1709167472144624896 X-GM-LABELS ("\\\\Important") UID 198 MODSEQ (27086) INTERNALDATE "26-Aug-2021 14:45:20 +0000" FLAGS () )'
[IMAP|Debug]: <= '* 12 FETCH (X-GM-THRID 1709166704339021881 X-GM-MSGID 1709167552444550666 X-GM-LABELS ("\\\\Important") UID 199 MODSEQ (27086) INTERNALDATE "26-Aug-2021 14:46:37 +0000" FLAGS () BODY[] {2545593}'
[IMAP|Debug]: <= '* 12 FETCH (X-GM-THRID 1709166704339021881 X-GM-MSGID 1709167552444550666 X-GM-LABELS ("\\\\Important") UID 199 MODSEQ (27086) INTERNALDATE "26-Aug-2021 14:46:37 +0000" FLAGS () )'
[IMAP|Debug]: <= '* 13 FETCH (X-GM-THRID 1709166704339021881 X-GM-MSGID 1709167627472549490 X-GM-LABELS ("\\\\Important") UID 200 MODSEQ (27086) INTERNALDATE "26-Aug-2021 14:47:48 +0000" FLAGS () BODY[] {2542510}'
[IMAP|Debug]: <= '* 13 FETCH (X-GM-THRID 1709166704339021881 X-GM-MSGID 1709167627472549490 X-GM-LABELS ("\\\\Important") UID 200 MODSEQ (27086) INTERNALDATE "26-Aug-2021 14:47:48 +0000" FLAGS () )'
[IMAP|Debug]: <= '* 14 FETCH (X-GM-THRID 1709166704339021881 X-GM-MSGID 1709167702987162758 X-GM-LABELS ("\\\\Important") UID 201 MODSEQ (27221) INTERNALDATE "26-Aug-2021 14:49:00 +0000" FLAGS () BODY[] {2607961}'
[IMAP|Debug]: <= '* 14 FETCH (X-GM-THRID 1709166704339021881 X-GM-MSGID 1709167702987162758 X-GM-LABELS ("\\\\Important") UID 201 MODSEQ (27221) INTERNALDATE "26-Aug-2021 14:49:00 +0000" FLAGS () )'
[IMAP|Debug]: <= '* 15 FETCH (X-GM-THRID 1709166704339021881 X-GM-MSGID 1709167792780889149 X-GM-LABELS ("\\\\Important") UID 202 MODSEQ (27272) INTERNALDATE "26-Aug-2021 14:50:26 +0000" FLAGS () BODY[] {2560081}'
[IMAP|Debug]: <= '* 15 FETCH (X-GM-THRID 1709166704339021881 X-GM-MSGID 1709167792780889149 X-GM-LABELS ("\\\\Important") UID 202 MODSEQ (27272) INTERNALDATE "26-Aug-2021 14:50:26 +0000" FLAGS () )'
[IMAP|Debug]: <= 'A6 OK Success [THROTTLED]'
[IMAP|Debug]: => 'IDLE IDLE'
[IMAP|Debug]: <= '+ idling'
[IMAP|Debug]: <= '* 17 EXISTS'

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mscdexcommented, Aug 29, 2021

It’s just part of the protocol and there’s no reason not to expose those features.

1reaction
mscdexcommented, Aug 26, 2021

The difference is:

  • Sequence numbers are always numbered from 1 to the number of messages in the mailbox. For example, that means when you delete a message with sequence number 5, the message with sequence number 6 gets shifted down and now has sequence number 5, etc.

  • UIDs are numbers that uniquely identify messages in the mailbox as long as the mailbox’s uidvalidity value hasn’t changed. That means when you delete by UID, the UIDs of other messages won’t change (again, until if/when the mailbox’s uidvalidity changes).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not receiving email from one sender - Google Support
Check if the email was delivered to Google. As an administrator, you can find missing messages using Email Log Search. If a message...
Read more >
Outlook Search not showing recent emails after Windows ...
Outlook Search not showing recent emails after Windows update KB5008212 · From Outlook select File, Options, Search. · Select Indexing Options, ...
Read more >
How to Fix Gmail When Its Not Receiving Emails - YouTube
Is your Gmail is not receiving emails ? This problem can be solved by performing some steps. Please watch this video till the...
Read more >
How to Fix Gmail Not Receiving Emails Issues? [ 5 Solutions]
Gmail not receiving emails ? Follow the solutions on this video to fix the issue of not receiving emails in Gmail.
Read more >
What to do if your Gmail is not receiving emails
Check your spam folder first · Check your trash folder next · Check to see if a filter is archiving the email unread...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found