/// <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); }
/// <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); }
/// <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); }
/// <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); }