Class EmailSenderExtensions
Useful extension methods for IEmailSender.
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Namespace: IRM.Mail
Assembly: IRM.dll
Syntax
public static class EmailSenderExtensions
Methods
SendEmailAsync(IEmailSender, EmailAddress, String, String, String, IEnumerable<FileAttachment>, IEnumerable<EmailAddress>, Action<Object>)
Sends an e-mail message to a receiver.
Declaration
public static Task SendEmailAsync(this IEmailSender emailSender, EmailAddress receiver, string subject, string message, string htmlMessage = null, IEnumerable<FileAttachment> attachments = null, IEnumerable<EmailAddress> cc = null, Action<object> createMailMessageCallback = null)
Parameters
IEmailSender
emailSender
The IEmailSender used to send the e-mail. |
EmailAddress
receiver
An e-mail addresses that should receive the e-mail. |
String
subject
The subject of the email. |
String
message
The e-mail message as simle text (body). |
String
htmlMessage
The e-mail message as html (body). |
IEnumerable<FileAttachment>
attachments
A collection of attachments to be included with the e-mail message. |
IEnumerable<EmailAddress>
cc
A collection of e.mail addresses that should get a copy of the e-mail. |
System.Action<Object>
createMailMessageCallback
A callback where caller can set additional MailMessage properties. |
Returns
System.Threading.Tasks.Task
The task object representing the asynchronous operation. |