Class AuthEmailSender
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
ILoggerFactoryazureOptions
IOptions<AzureOptions>authOptions
IOptions<AuthOptions>
Fields
_authOptions
private readonly AuthOptions _authOptions
Field Value
_azureOptions
private readonly AzureOptions _azureOptions
Field Value
_logger
private readonly ILogger _logger
Field Value
Methods
GetAccessTokenAsync()
private Task<MailAccessToken> GetAccessTokenAsync()
Returns
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
stringThe recipient's email address.
subject
stringThe subject of the email.
htmlMessage
stringThe body of the email which may contain HTML tags. Do not double encode this.