Class SendEmailNotification
Notification published when an email needs to be sent.
Inheritance
object
Namespace: Umbraco.Cms.Core.Notifications
Assembly: Umbraco.Core.dll
Syntax
public class SendEmailNotification : INotification
Remarks
Handlers can intercept this notification to provide custom email sending logic or to modify the email before it is sent. Call HandleEmail() to indicate that the email has been handled and should not be processed by the default handler.
Constructors
View SourceSendEmailNotification(NotificationEmailModel, string)
Initializes a new instance of the SendEmailNotification class.
Declaration
public SendEmailNotification(NotificationEmailModel message, string emailType)
Parameters
| Type | Name | Description |
|---|---|---|
| NotificationEmailModel | message | The email message to send. |
| string | emailType | Metadata about the type of email being sent. |
Properties
View SourceEmailType
Some metadata about the email which can be used by handlers to determine if they should handle the email or not
Declaration
public string EmailType { get; }
Property Value
| Type | Description |
|---|---|
| string |
IsHandled
Returns true if the email sending is handled.
Declaration
public bool IsHandled { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Message
Gets the email message to send.
Declaration
public NotificationEmailModel Message { get; }
Property Value
| Type | Description |
|---|---|
| NotificationEmailModel |
Methods
View SourceHandleEmail()
Call to tell Umbraco that the email sending is handled.
Declaration
public void HandleEmail()