Пример #1
0
 /// <summary>
 /// Initializes an instance of the Email class
 /// </summary>
 /// <param name="token">A user-defined object that is passed to the method invoked when the asynchronous operation completes.(use when IsAsync = true)</param>
 /// <param name="networkSettings">Network settings of SMTP</param>
 /// <param name="from">From address for e-mail message</param>
 /// <param name="to">Recipients of e-mail message</param>
 /// <param name="subject">Subject of e-mail message</param>
 /// <param name="body">E-mail message body</param>
 /// <param name="isBodyHtml">If true : Mail message body is in Html.</param>
 /// <param name="isAsync">If true : Do not block the calling thread when sending e-mail message.</param>
 public Email(object token, EmailSettings.NetworkSettings networkSettings, string from, string[] to, string subject, string body, bool isBodyHtml, bool isAsync)
 {
     this.Token           = token;
     this.NetworkSettings = networkSettings;
     this.From            = from;
     this.To         = to;
     this.Subject    = subject;
     this.Body       = body;
     this.IsBodyHtml = isBodyHtml;
     this.IsAsync    = IsAsync;
 }
Пример #2
0
 /// <summary>
 /// Initializes an instance of the Email class
 /// </summary>
 /// <param name="networkSettings">Network settings of SMTP</param>
 /// <param name="from">From address for e-mail message</param>
 /// <param name="to">Recipients of e-mail message</param>
 /// <param name="subject">Subject of e-mail message</param>
 /// <param name="body">E-mail message body</param>
 public Email(EmailSettings.NetworkSettings networkSettings, string from, string[] to, string subject, string body)
     : this(Guid.NewGuid(), networkSettings, from, to, subject, body, false, false)
 {
 }