AccountEventEmailHandler class
namespace: Serenity.Extensions assembly: Serenity.Extensions
Emails a user when the account changes, e.g. the password, so the user learns of a change that the user did not do. The email of a changed email address goes to the old address. See AccountEventEmailOptions to turn it off, or leave some kinds out.
public class AccountEventEmailHandler : IAccountEventHandler
| parameter |
description |
| options |
The options. |
| localizer |
The localizer of the texts. |
| serviceProvider |
The services, to render the email when there is no request. |
| emailSender |
Sends the emails, without which nothing is sent. |
| httpContextAccessor |
Gives the request, whose services render the email. |
Public Members
| name |
description |
| AccountEventEmailHandler(…) |
Emails a user when the account changes, e.g. the password, so the user learns of a change that the user did not do. The email of a changed email address goes to the old address. See AccountEventEmailOptions to turn it off, or leave some kinds out. |
| virtual HandleAsync(…) |
|
Protected Members
| name |
description |
| virtual CreateModel(…) |
Creates the model of the email, with its subject and the sentence of what changed. |
| virtual GetRecipient(…) |
Gets who the email goes to: the old address of a changed email address, else the address of the user. |
| virtual GetViewName(…) |
Gets the view of the email of a kind of event: one of its own when there is one, e.g. AccountEventEmail.PasswordChanged.cshtml next to the AccountEventEmail view, which an application adds at the same path in its project, else the AccountEventEmail view. |
| virtual IsEmailed(…) |
Whether the user is emailed about this kind of event: the changes of the account, not e.g. the sign-ins. |
| virtual RenderBody(…) |
Renders the body of the email, from the view of its kind, see GetViewName. |
See Also