Class EmailNotificationMethod
A health check notification method that sends results via email.
Namespace: Umbraco.Cms.Core.HealthChecks.NotificationMethods
Assembly: Umbraco.Core.dll
Syntax
[HealthCheckNotificationMethod("email")]
public class EmailNotificationMethod : NotificationMethodBase, IHealthCheckNotificationMethod, IDiscoverable
Constructors
View SourceEmailNotificationMethod(ILocalizedTextService, IHostingEnvironment, IEmailSender, IOptionsMonitor<HealthChecksSettings>, IOptionsMonitor<ContentSettings>, IMarkdownToHtmlConverter)
Initializes a new instance of the EmailNotificationMethod class.
Declaration
public EmailNotificationMethod(ILocalizedTextService textService, IHostingEnvironment hostingEnvironment, IEmailSender emailSender, IOptionsMonitor<HealthChecksSettings> healthChecksSettings, IOptionsMonitor<ContentSettings> contentSettings, IMarkdownToHtmlConverter markdownToHtmlConverter)
Parameters
| Type | Name | Description |
|---|---|---|
| ILocalizedTextService | textService | The localized text service. |
| IHostingEnvironment | hostingEnvironment | The hosting environment. |
| IEmailSender | emailSender | The email sender service. |
| IOptionsMonitor<HealthChecksSettings> | healthChecksSettings | The health checks settings monitor. |
| IOptionsMonitor<ContentSettings> | contentSettings | The content settings monitor. |
| IMarkdownToHtmlConverter | markdownToHtmlConverter | The markdown to HTML converter. |
Properties
View SourceRecipientEmail
Gets the recipient email address for health check notifications.
Declaration
public string? RecipientEmail { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
View SourceSendAsync(HealthCheckResults)
Sends the health check results via this notification method.
Declaration
public override Task SendAsync(HealthCheckResults results)
Parameters
| Type | Name | Description |
|---|---|---|
| HealthCheckResults | results | The health check results to send. |
Returns
| Type | Description |
|---|---|
| Task | A task representing the asynchronous operation. |