Exemplo n.º 1
0
		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;
		}
Exemplo n.º 2
0
		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) { }
Exemplo n.º 3
0
		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) { }
Exemplo n.º 4
0
		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) { }
Exemplo n.º 5
0
		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);
			}
		}
Exemplo n.º 6
0
 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)
 {
 }
Exemplo n.º 7
0
		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");
			}
		}
Exemplo n.º 8
0
 public Mail(MailAddressCollection to, MailAddress from, string message, string subject) : this(to, from, message, subject, null, null, null, null, false, null, null, MailFormat.Text)
 {
 }
Exemplo n.º 9
0
 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)
 {
 }
Exemplo n.º 10
0
 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;
 }
Exemplo n.º 11
0
 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);
     }
 }
Exemplo n.º 12
0
 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)
 {
 }
Exemplo n.º 13
0
 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)
 {
 }
Exemplo n.º 14
0
 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)
 {
 }
Exemplo n.º 15
0
		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) { }
Exemplo n.º 16
0
		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;
		}
Exemplo n.º 17
0
		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) { }
Exemplo n.º 18
0
		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;
		}