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(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); } }
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) { }
private static void AppendRecivers(StringBuilder sb, MailAddressCollection addresses, string type) { if(addresses != null && addresses.Count > 0) { sb.Append(type); sb.Append(": "); for(int i = 0; i < addresses.Count; i++) { sb.Append(i > 0 ? ", " : string.Empty); AppendAddress(sb, addresses[i]); } sb.Append("\r\n"); } }
public Mail(MailAddressCollection to, MailAddress from, string message, string subject) : this(to, from, message, subject, null, null, null, null, false, null, null, MailFormat.Text) { }
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); } }
public Mail(MailAddress 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(MailAddress 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(MailAddress to, MailAddress from, string message, string subject, MailAddressCollection cc, MailFormat format) : this(to, from, message, subject, cc, null, null, null, false, null, null, format) { }
private static MailAddressCollection GetMailAddressCollection(string addresses) { MailAddressCollection result = new MailAddressCollection(); if(!string.IsNullOrEmpty(addresses)) { string[] addressArray = addresses.Split(';', ','); foreach(string address in addressArray) { result.Add(GetMailAddress(address)); } } return result; }
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 static MailAddressCollection Synchronized(MailAddressCollection nonSync) { if(nonSync == null) { throw new ArgumentNullException("nonSync"); } MailAddressCollection sync = new MailAddressCollection(); sync.innerArray = ArrayList.Synchronized(nonSync.innerArray); return sync; }