Exemple #1
0
        static void ListMessagesBetweenIntervals()
        {
            //https://support.google.com/mail/answer/7190?hl=en
            GmailServiceBuilder gmailServiceBuilder = new GmailServiceBuilder();
            var listOfMessages = gmailServiceBuilder.ListMessages("me", "is:unread after:2017/09/16 before:2017/09/25");

            foreach (Message item in listOfMessages)
            {
                var  message      = gmailServiceBuilder.GetMessage("me", item.Id);
                var  listOfLabels = gmailServiceBuilder.GetLabelsForMessage(message);
                bool isImportant  = gmailServiceBuilder.MessageHasImportantLabel(message);
                var  x            = 2;
            }
        }
Exemple #2
0
        static void ListMessages()
        {
            GmailServiceBuilder gmailServiceBuilder = new GmailServiceBuilder();
            var listOfMessages = gmailServiceBuilder.ListMessages("me", "is:read after:2018/01/01 before:2018/02/07"); //interval query

            foreach (Message item in listOfMessages)
            {
                //var message = gmailServiceBuilder.GetMessage("me", item.Id);
                var messageSecond = gmailServiceBuilder.GetMinimalMessage("me", item.Id);
                //var listOfLabels = gmailServiceBuilder.GetLabelsForMessage("*****@*****.**");
                //bool isImportant = gmailServiceBuilder.MessageHasImportantLabel(message);
                var x = 2;
            }
        }