using System; using System.Collections.Generic; using System.Net.Mail; using System.Text; using Neo.Afx.ComponentModel; namespace Neo.Afx.WinService.Messages { public class Pop3Message { public const char AddressSeparator = ','; public List Attachments { get; set; } public string Bcc { get; set; } public string Body { get; set; } public string CC { get; set; } public DateTime DateSent { get; set; } public string From { get; set; } public bool IsBodyHtml { get; set; } public MailPriority Priority { get; set; } public string ReplyTo { get; set; } public string Sender { get; set; } public string Subject { get; set; } public string To { get; set; } public override string ToString() { var sb = new StringBuilder(); sb.Append(DateSent.ToString("yyyy/MM/dd HH:mm")); sb.Append(" - "); sb.Append(Subject); sb.Append(" ("); sb.Append(Attachments.Count); sb.Append(" Attachment"); sb.Append(Attachments.Count > 1 ? "s)" : ")"); return sb.ToString(); } } }