Table of Contents

Class AuthEmailSender

Namespace
arolariu.Backend.Core.Auth.Brokers
Assembly
arolariu.Backend.Core.Auth.dll

The email sender for the authentication module.

internal sealed class AuthEmailSender : IEmailSender
Inheritance
AuthEmailSender
Implements
Inherited Members

Constructors

AuthEmailSender(ILoggerFactory, IOptions<AzureOptions>, IOptions<AuthOptions>)

public AuthEmailSender(ILoggerFactory logger, IOptions<AzureOptions> azureOptions, IOptions<AuthOptions> authOptions)

Parameters

logger ILoggerFactory
azureOptions IOptions<AzureOptions>
authOptions IOptions<AuthOptions>

Fields

_authOptions

private readonly AuthOptions _authOptions

Field Value

AuthOptions

_azureOptions

private readonly AzureOptions _azureOptions

Field Value

AzureOptions

_logger

private readonly ILogger _logger

Field Value

ILogger

Methods

GetAccessTokenAsync()

private Task<MailAccessToken> GetAccessTokenAsync()

Returns

Task<MailAccessToken>

SendEmailAsync(string, string, string)

This API supports the ASP.NET Core Identity infrastructure and is not intended to be used as a general purpose email abstraction. It should be implemented by the application so the Identity infrastructure can send confirmation and password reset emails.

public Task SendEmailAsync(string email, string subject, string htmlMessage)

Parameters

email string

The recipient's email address.

subject string

The subject of the email.

htmlMessage string

The body of the email which may contain HTML tags. Do not double encode this.

Returns

Task