IEmailSender

Namespace: Proffer.Email

Sends templated or raw emails using configured providers.

public interface IEmailSender

Methods

SendEmailAsync(String, String, IEmailAddress[])

Sends an email.

Task SendEmailAsync(string subject, string message, IEmailAddress[] to)

Parameters

subject String
The subject.

message String
The body as plain text.

to IEmailAddress[]
The email recipients.

Returns

Task

        A task that represents the asynchronous operation.

SendEmailAsync(IEmailAddress, String, String, IEmailAddress[])

Sends an email.

Task SendEmailAsync(IEmailAddress from, string subject, string message, IEmailAddress[] to)

Parameters

from IEmailAddress
The sender email address.

subject String
The subject.

message String
The body as plain text.

to IEmailAddress[]
The email recipients.

Returns

Task

        A task that represents the asynchronous operation.

SendEmailAsync(IEmailAddress, IEmailAddress, String, String, Boolean, IEmailAddress[])

Sends an email.

Task SendEmailAsync(IEmailAddress from, IEmailAddress replyTo, string subject, string message, bool plainTextOnly, IEmailAddress[] to)

Parameters

from IEmailAddress
The sender email address.

replyTo IEmailAddress
The reply-to email address.

subject String
The subject.

message String
The body as plain text.

plainTextOnly Boolean
If set to true the body shoud be sent as plain text only.

to IEmailAddress[]
The email recipients.

Returns

Task

        A task that represents the asynchronous operation.

SendEmailAsync(IEmailAddress, String, String, IEnumerable<IEmailAttachment>, IEmailAddress[])

Sends an email.

Task SendEmailAsync(IEmailAddress from, string subject, string message, IEnumerable<IEmailAttachment> attachments, IEmailAddress[] to)

Parameters

from IEmailAddress
The sender email address.

subject String
The subject.

message String
The body as plain text.

attachments IEnumerable<IEmailAttachment>
The file attachments.

to IEmailAddress[]
The email recipients.

Returns

Task

        A task that represents the asynchronous operation.

SendEmailAsync(IEmailAddress, IEmailAddress, String, String, Boolean, IEnumerable<IEmailAttachment>, IEmailAddress[])

Sends an email.

Task SendEmailAsync(IEmailAddress from, IEmailAddress replyTo, string subject, string message, bool plainTextOnly, IEnumerable<IEmailAttachment> attachments, IEmailAddress[] to)

Parameters

from IEmailAddress
The sender email address.

replyTo IEmailAddress
The reply-to email address.

subject String
The subject.

message String
The body as plain text.

plainTextOnly Boolean
If set to true the body shoud be sent as plain text only.

attachments IEnumerable<IEmailAttachment>
The file attachments.

to IEmailAddress[]
The email recipients.

Returns

Task

        A task that represents the asynchronous operation.

SendEmailAsync(IEmailAddress, String, String, IEnumerable<IEmailAttachment>, IEmailAddress[], IEmailAddress[], IEmailAddress[], IEmailAddress, Boolean)

Sends an email.

Task SendEmailAsync(IEmailAddress from, string subject, string message, IEnumerable<IEmailAttachment> attachments, IEmailAddress[] to, IEmailAddress[] cc, IEmailAddress[] bcc, IEmailAddress replyTo, bool plainTextOnly)

Parameters

from IEmailAddress
The sender email address.

subject String
The subject.

message String
The body as plain text.

attachments IEnumerable<IEmailAttachment>
The file attachments.

to IEmailAddress[]
The email recipients.

cc IEmailAddress[]
The CC email recipients.

bcc IEmailAddress[]
The BCC email recipients.

replyTo IEmailAddress
The reply-to email address.

plainTextOnly Boolean
If set to true the body shoud be sent as plain text only.

Returns

Task

        A task that represents the asynchronous operation.

SendTemplatedEmailAsync<T>(String, T, IEmailAddress[])

Sends a templated email from the configured default sender email address.

Task SendTemplatedEmailAsync<T>(string templateKey, T context, IEmailAddress[] to)

Type Parameters

T
The type of context to apply on the template.

Parameters

templateKey String
The template key.

context T
The context to apply on the template.

to IEmailAddress[]
The email recipients.

Returns

Task

        A task that represents the asynchronous operation.

SendTemplatedEmailAsync<T>(IEmailAddress, String, T, IEmailAddress[])

Sends a templated email.

Task SendTemplatedEmailAsync<T>(IEmailAddress from, string templateKey, T context, IEmailAddress[] to)

Type Parameters

T
The type of context to apply on the template.

Parameters

from IEmailAddress
The sender email address.

templateKey String
The template key.

context T
The context to apply on the template.

to IEmailAddress[]
The email recipients.

Returns

Task

        A task that represents the asynchronous operation.

SendTemplatedEmailAsync<T>(IEmailAddress, IEmailAddress, String, T, IEmailAddress[])

Sends a templated email.

Task SendTemplatedEmailAsync<T>(IEmailAddress from, IEmailAddress replyTo, string templateKey, T context, IEmailAddress[] to)

Type Parameters

T
The type of context to apply on the template.

Parameters

from IEmailAddress
The sender email address.

replyTo IEmailAddress
The reply-to email address.

templateKey String
The template key.

context T
The context to apply on the template.

to IEmailAddress[]
The email recipients.

Returns

Task

        A task that represents the asynchronous operation.

SendTemplatedEmailAsync<T>(IEmailAddress, String, T, IEnumerable<IEmailAttachment>, IEmailAddress[])

Sends a templated email.

Task SendTemplatedEmailAsync<T>(IEmailAddress from, string templateKey, T context, IEnumerable<IEmailAttachment> attachments, IEmailAddress[] to)

Type Parameters

T
The type of context to apply on the template.

Parameters

from IEmailAddress
The sender email address.

templateKey String
The template key.

context T
The context to apply on the template.

attachments IEnumerable<IEmailAttachment>
The file attachments.

to IEmailAddress[]
The email recipients.

Returns

Task

        A task that represents the asynchronous operation.

SendTemplatedEmailAsync<T>(IEmailAddress, IEmailAddress, String, T, IEnumerable<IEmailAttachment>, IEmailAddress[])

Sends a templated email.

Task SendTemplatedEmailAsync<T>(IEmailAddress from, IEmailAddress replyTo, string templateKey, T context, IEnumerable<IEmailAttachment> attachments, IEmailAddress[] to)

Type Parameters

T
The type of context to apply on the template.

Parameters

from IEmailAddress
The sender email address.

replyTo IEmailAddress
The reply-to email address.

templateKey String
The template key.

context T
The context to apply on the template.

attachments IEnumerable<IEmailAttachment>
The file attachments.

to IEmailAddress[]
The email recipients.

Returns

Task

        A task that represents the asynchronous operation.

SendTemplatedEmailAsync<T>(IEmailAddress, String, T, IEnumerable<IEmailAttachment>, IEmailAddress[], IEmailAddress[], IEmailAddress[], IEmailAddress)

Sends a templated email.

Task SendTemplatedEmailAsync<T>(IEmailAddress from, string templateKey, T context, IEnumerable<IEmailAttachment> attachments, IEmailAddress[] to, IEmailAddress[] cc, IEmailAddress[] bcc, IEmailAddress replyTo)

Type Parameters

T
The type of context to apply on the template.

Parameters

from IEmailAddress
The sender email address.

templateKey String
The template key.

context T
The context to apply on the template.

attachments IEnumerable<IEmailAttachment>
The file attachments.

to IEmailAddress[]
The email recipients.

cc IEmailAddress[]
The CC email recipients.

bcc IEmailAddress[]
The BCC email recipients.

replyTo IEmailAddress
The reply-to email address.

Returns

Task

        A task that represents the asynchronous operation.