Ejemplo n.º 1
0
Archivo: Email.cs Proyecto: Nucs/nlib
 /// <summary>
 ///     Sends an email.
 /// </summary>
 /// <param name="sender">Which email address sends this email</param>
 /// <param name="receiver">The receiver of the email</param>
 /// <param name="subject">Subject of the email</param>
 /// <param name="body">Content of the email</param>
 public async Task Send(MailAddress sender, string receiver, string subject, Body body) {
     await Send(sender, new MailAddress(receiver), subject, body.Content);
 }
Ejemplo n.º 2
0
Archivo: Email.cs Proyecto: Nucs/nlib
 /// <summary>
 ///     Sends a templated email.
 /// </summary>
 /// <param name="sender">Which email address sends this email</param>
 /// <param name="receiver">The receiver of the email</param>
 /// <param name="subject">Subject of the email</param>
 /// <param name="body">Content of the email</param>
 /// <param name="source">Which source refer to</param>
 /// <param name="identifier">Depends on the EmailSource, if File then a path, if Resource then the resource name.</param>
 public async Task SendTemplate(MailAddress sender, string receiver, string subject, Body body, EmailSource source, string identifier) {
     await SendTemplate(sender, new MailAddress(receiver), subject, body.Content, source, identifier);
 }
Ejemplo n.º 3
0
Archivo: Email.cs Proyecto: Nucs/nlib
 /// <summary>
 ///     Sends an email.
 /// </summary>
 /// <param name="sender">Which email address sends this email</param>
 /// <param name="receiver">The receiver of the email</param>
 /// <param name="subject">Subject of the email</param>
 /// <param name="body">Content of the email</param>
 public async Task Send(string receiver, string subject, Body body) {
     await Send(new MailAddress(DefaultSender, DefaultSenderDisplayName), new MailAddress(receiver), subject, body.Content);
 }
Ejemplo n.º 4
0
Archivo: Email.cs Proyecto: Nucs/nlib
 /// <summary>
 ///     Sends a templated email.
 /// </summary>
 /// <param name="sender">Which email address sends this email</param>
 /// <param name="receiver">The receiver of the email</param>
 /// <param name="subject">Subject of the email</param>
 /// <param name="body">Content of the email</param>
 /// <param name="source">Which source refer to</param>
 /// <param name="identifier">Depends on the EmailSource, if File then a path, if Resource then the resource name.</param>
 public async Task SendTemplate(string receiver, string subject, Body body, EmailSource source, string identifier) {
     await SendTemplate(new MailAddress(DefaultSender, DefaultSenderDisplayName), new MailAddress(receiver), subject, body.Content, source, identifier);
 }