public Mail(MailAddressCollection to, MailAddress from, string message, string subject, MailAddressCollection cc, MailAddressCollection bcc, MailAddress replyTo, MailAddress sender, bool senderHidden, string alternativeMessage, AttachmentCollection attachments, MailFormat format) { this.to = to; this.From = from; this.ReplyTo = replyTo; this.Sender = sender; this.Message = message; this.AlternativeMessage = alternativeMessage; this.Subject = subject; this.CC = cc; this.BCC = bcc; this.attachments = (attachments ?? new AttachmentCollection()); this.headers = new NameValueCollection(); this.Format = format; this.SenderHidden = senderHidden; }
public Mail(MailAddress to, MailAddress from, string message, string subject) : this(to, from, message, subject, null, null, null, null, false, null, null, MailFormat.Text) { }
public Mail(MailAddressCollection to, MailAddress from, string message, string subject, MailAddressCollection cc, MailAddressCollection bcc, AttachmentCollection attachments, MailFormat format, string alternativeMessage) : this(to, from, message, subject, cc, bcc, null, null, false, alternativeMessage, attachments, format) { }
public Mail(MailAddressCollection to, MailAddress from, string message, string subject, MailFormat format, string alternativeMessage) : this(to, from, message, subject, null, null, null, null, false, alternativeMessage, null, format) { }
public Mail(MailAddressCollection to, MailAddress from, string message, string subject, MailAddressCollection cc, MailAddressCollection bcc, AttachmentCollection attachments) : this(to, from, message, subject, cc, bcc, null, null, false, null, attachments, MailFormat.Text) { }
public Mail(MailAddressCollection to, MailAddress from, string message, string subject, MailAddressCollection cc, MailFormat format) : this(to, from, message, subject, cc, null, null, null, false, null, null, format) { }
public Mail(MailAddressCollection to, MailAddress from, string message, string subject, AttachmentCollection attachments, MailFormat format) : this(to, from, message, subject, null, null, null, null, false, null, attachments, format) { }
public Mail(MailAddress to, MailAddress from, string message, string subject, MailAddressCollection cc, MailAddressCollection bcc, MailAddress replyTo, MailAddress sender, bool senderHidden, string alternativeMessage, AttachmentCollection attachments, MailFormat format) : this(null as MailAddressCollection, from, message, subject, cc, bcc, replyTo, sender, senderHidden, alternativeMessage, attachments, format) { if(to != null) { this.to = new MailAddressCollection(to); } }
private static void AppendSender(StringBuilder sb, MailAddress address, string type) { if(address != null) { sb.Append(type); sb.Append(": "); AppendAddress(sb, address); sb.Append("\r\n"); } }
private static void AppendAddress(StringBuilder sb, MailAddress address) { if(address != null) { if(address.Name != null) { sb.Append(EncodeHeaderValue(address.Name)); sb.Append(" <"); sb.Append(address.Mail); sb.Append(">"); } else { sb.Append(address.Mail); } } }
public void CopyTo(MailAddress[] array, int index) { InnerArray.CopyTo(array, index); }
public bool Contains(MailAddress mailAddress) { return (InnerArray.Contains(mailAddress)); }
public void Remove(MailAddress mailAddress) { InnerArray.Remove(mailAddress); }
public void Add(MailAddress mailAddress) { InnerArray.Add(mailAddress); }
internal MailAddressCollection(MailAddress mailAddress) : this() { this.innerArray.Add(mailAddress); }