
Tags: C# IMAP IMAP component VB.NET X-GM-THRID Questions?Ĭonsider using our Q&A forum for asking any questions. In a nutshell, you write a script to search for certain messages in your inbox, iterate over them checking anything you couldnt search for and applying your. Find threads containing single message.Ĭonsole.WriteLine("Gmail message id: ", _Įnvelope.GmailMessageId, envelope.Subject) If (threads.ContainsKey(threadId) = false) List envelopes = client.GetEnvelopeByUID(uids) ĭecimal threadId = (decimal) envelope.GmailThreadId Using(Imap client = new "app-password") ĬommonFolders common = new CommonFolders(folders) It contains thread id to which this email was assigned to by Gmail.įinally we’ll find threads that contain only one message – those are messages that were not answered. Envelope contains GmailThreadId property. Then we’ll get Envelope for each message. We’ll connect to Gmail using IMAP – remember to use SSL and be sure to enable IMAP protocol for Gmail.Īs we plan to search all emails, including sent and received ones, we’ll use CommonFolders class to get ‘All Mail’ folder. One option to resolve this problem is to use Gmail IMAP extensions, X-GM-THRID in particular. This means that \Answered flag can’t be used to find not-answered emails. It will only be set if the messages were answered using an email program that sets this flag. Unfortunately if the message is answered through Gmail’s web interface, the \Answered flag will not be set. This flag can by set by client applications or even by SMTP server, which can be examining In-Reply-To email headers.

\Answered flag should mark messages that have been answered. Here’s a follow-up schedule you can use: Day 1: Initial outreach email. IMAP protocol in RFC3501 introduced \Answered flag. Keep in mind that you should extend this wait time for every subsequent email you send in order to avoid annoying prospects.
