/// <summary>
 ///   Initializes a new instance of the <see cref="SerializableMailMessage" /> class.
 /// </summary>
 /// <param name="m">The m.</param>
 private SerializableMailMessage(MailMessage m)
 {
   AlternateViews = new SerializableAlternateViewCollection();
   foreach (var a in m.AlternateViews)
     AlternateViews.Add(a);
   Attachments = new SerializableAttachmentCollection();
   foreach (var a in m.Attachments)
     Attachments.Add(a);
   Bcc = new SerializableMailAddressCollection();
   foreach (var a in m.Bcc)
     Bcc.Add(a);
   Body = m.Body;
   BodyEncoding = m.BodyEncoding;
   BodyTransferEncoding = m.BodyTransferEncoding;
   CC = new SerializableMailAddressCollection();
   foreach (var a in m.CC)
     CC.Add(a);
   DeliveryNotificationOptions = m.DeliveryNotificationOptions;
   From = m.From;
   Headers = new NameValueCollection();
   Headers.Add(m.Headers);
   HeadersEncoding = m.HeadersEncoding;
   IsBodyHtml = m.IsBodyHtml;
   Priority = m.Priority;
   ReplyTo = m.ReplyTo;
   ReplyToList = new SerializableMailAddressCollection();
   foreach (var a in m.ReplyToList)
     ReplyToList.Add(a);
   Sender = m.Sender;
   Subject = m.Subject;
   SubjectEncoding = m.SubjectEncoding;
   To = new SerializableMailAddressCollection();
   foreach (var a in m.To)
     To.Add(a);
 }
 /// <summary>
 ///   Initializes a new instance of the <see cref="SerializableMailMessage" /> class.
 /// </summary>
 /// <param name="m">The m.</param>
 private SerializableMailMessage(MailMessage m)
 {
     AlternateViews = new SerializableAlternateViewCollection();
     foreach (var a in m.AlternateViews)
     {
         AlternateViews.Add(a);
     }
     Attachments = new SerializableAttachmentCollection();
     foreach (var a in m.Attachments)
     {
         Attachments.Add(a);
     }
     Bcc = new SerializableMailAddressCollection();
     foreach (var a in m.Bcc)
     {
         Bcc.Add(a);
     }
     Body                 = m.Body;
     BodyEncoding         = m.BodyEncoding;
     BodyTransferEncoding = m.BodyTransferEncoding;
     CC = new SerializableMailAddressCollection();
     foreach (var a in m.CC)
     {
         CC.Add(a);
     }
     DeliveryNotificationOptions = m.DeliveryNotificationOptions;
     From    = m.From;
     Headers = new NameValueCollection();
     Headers.Add(m.Headers);
     HeadersEncoding = m.HeadersEncoding;
     IsBodyHtml      = m.IsBodyHtml;
     Priority        = m.Priority;
     ReplyTo         = m.ReplyTo;
     ReplyToList     = new SerializableMailAddressCollection();
     foreach (var a in m.ReplyToList)
     {
         ReplyToList.Add(a);
     }
     Sender          = m.Sender;
     Subject         = m.Subject;
     SubjectEncoding = m.SubjectEncoding;
     To = new SerializableMailAddressCollection();
     foreach (var a in m.To)
     {
         To.Add(a);
     }
 }