Skip to main content
Table of Contents

Class IdentityNoOpEmailSender<TUser>

Namespace
Stratara.Identity.AspNetCore.Services
Assembly
Stratara.Identity.AspNetCore.dll

Development-time IEmailSender<TUser> that silently drops every email (returns CompletedTask without sending anything).

public sealed class IdentityNoOpEmailSender<TUser> : IEmailSender<TUser> where TUser : class, new()

Type Parameters

TUser

The ASP.NET Core Identity user type.

Inheritance
IdentityNoOpEmailSender<TUser>
Implements
Inherited Members
Extension Methods

Remarks

Never register this in production. Use AddDevelopmentNoOpEmailSender<TUser> on the host builder to wire it via DI — that extension throws when the host environment is Production.

In production register a real IEmailSender<TUser> implementation (e.g. SendGrid, Mailgun, AWS SES) instead.

Methods

SendConfirmationLinkAsync(TUser, string, string)

Drops a confirmation-link email.

public Task SendConfirmationLinkAsync(TUser user, string email, string confirmationLink)

Parameters

user TUser

The identity user.

email string

Recipient email address.

confirmationLink string

Absolute URL that confirms the account when visited.

Returns

Task

SendPasswordResetCodeAsync(TUser, string, string)

Drops a password-reset-code email.

public Task SendPasswordResetCodeAsync(TUser user, string email, string resetCode)

Parameters

user TUser

The identity user.

email string

Recipient email address.

resetCode string

The reset code to display to the user.

Returns

Task

SendPasswordResetLinkAsync(TUser, string, string)

Drops a password-reset-link email.

public Task SendPasswordResetLinkAsync(TUser user, string email, string resetLink)

Parameters

user TUser

The identity user.

email string

Recipient email address.

resetLink string

Absolute URL that opens the password-reset flow when visited.

Returns

Task