示例#1
0
        private void WriteMessageToFile(FileStream file, string id, string topic, string agent, MailItem mailItem)
        {
            if (mailItem.HasBeenDeferred || mailItem.HasBeenDeleted)
            {
                MessageSnapshotWriter.WriteInjectedHeadersToFile(file, id, topic, agent, null, null, mailItem.HasBeenDeferred ? "Deferred" : "Deleted");
                return;
            }
            string[] array = new string[mailItem.Recipients.Count];
            int      num   = 0;

            foreach (EnvelopeRecipient envelopeRecipient in mailItem.Recipients)
            {
                array[num++] = envelopeRecipient.Address.ToString();
            }
            MessageSnapshotWriter.WriteInjectedHeadersToFile(file, id, topic, agent, mailItem.FromAddress.ToString(), array);
            mailItem.MimeDocument.RootPart.WriteTo(file);
        }
示例#2
0
 private static void WriteInjectedHeadersToFile(FileStream file, string id, string topic, string agent, string sender, IEnumerable <string> receivers)
 {
     MessageSnapshotWriter.WriteInjectedHeadersToFile(file, id, topic, agent, sender, receivers, null);
 }