public Task StoreMessageLabelsAsync(MailMessage message)
 {
     return StoreMessageLabelsAsync(message.GetThreadId(), message.GetMessageId(), message.GetLabelsHeader());
 }
 // Break the message up into parts: Flags, labels, headers/structure, and body parts
 public async Task StoreMessageAsync(MailMessage message)
 {
     await StoreMessageFlagsAsync(message.GetThreadId(), message.GetMessageId(), Utilities.FlagsToFlagString(message.Flags));
     await StoreMessageLabelsAsync(message.GetThreadId(), message.GetMessageId(), message.GetLabelsHeader());
     await StoreMessageHeadersAsync(message);
     if (message.Scope >= Scope.HeadersAndBodySnyppit)
     {
         // TODO: Verify BodyId is set.
         // Body parts
         if (!message.AlternateViews.Any() && !message.Attachments.Any())
         {
             // Simple body
             await StoreMessagePartAsync(message.GetThreadId(), message.GetMessageId(), message.BodyId, message.Body);
         }
         else
         {
             // Multipart body
             foreach (Attachment view in message.AlternateViews)
             {
                 await StoreMessagePartAsync(message.GetThreadId(), message.GetMessageId(), view.BodyId, view.Body);
             }
             foreach (Attachment attachment in message.Attachments)
             {
                 await StoreMessagePartAsync(message.GetThreadId(), message.GetMessageId(), attachment.BodyId, attachment.Body);
             }
         }
     }
 }