Search Results for

    Show / Hide Table of Contents
    View Source

    Class EmailSender

    A utility class for sending emails

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Infrastructure.Mail
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public class EmailSender : IEmailSender

    Constructors

    View Source

    EmailSender(ILogger<EmailSender>, IOptionsMonitor<GlobalSettings>, IEventAggregator)

    Declaration
    public EmailSender(ILogger<EmailSender> logger, IOptionsMonitor<GlobalSettings> globalSettings, IEventAggregator eventAggregator)
    Parameters
    Type Name Description
    ILogger<EmailSender> logger
    IOptionsMonitor<GlobalSettings> globalSettings
    IEventAggregator eventAggregator
    View Source

    EmailSender(ILogger<EmailSender>, IOptionsMonitor<GlobalSettings>, IEventAggregator, INotificationHandler<SendEmailNotification>, INotificationAsyncHandler<SendEmailNotification>)

    Declaration
    public EmailSender(ILogger<EmailSender> logger, IOptionsMonitor<GlobalSettings> globalSettings, IEventAggregator eventAggregator, INotificationHandler<SendEmailNotification> handler1, INotificationAsyncHandler<SendEmailNotification> handler2)
    Parameters
    Type Name Description
    ILogger<EmailSender> logger
    IOptionsMonitor<GlobalSettings> globalSettings
    IEventAggregator eventAggregator
    INotificationHandler<SendEmailNotification> handler1
    INotificationAsyncHandler<SendEmailNotification> handler2

    Methods

    View Source

    CanSendRequiredEmail()

    Returns true if the application should be able to send a required application email

    Declaration
    public bool CanSendRequiredEmail()
    Returns
    Type Description
    System.Boolean
    Remarks

    We assume this is possible if either an event handler is registered or an smtp server is configured or a pickup directory location is configured

    View Source

    SendAsync(EmailMessage, String)

    Sends the message async

    Declaration
    public async Task SendAsync(EmailMessage message, string emailType)
    Parameters
    Type Name Description
    EmailMessage message
    System.String emailType
    Returns
    Type Description
    Task
    View Source

    SendAsync(EmailMessage, String, Boolean)

    Declaration
    public async Task SendAsync(EmailMessage message, string emailType, bool enableNotification)
    Parameters
    Type Name Description
    EmailMessage message
    System.String emailType
    System.Boolean enableNotification
    Returns
    Type Description
    Task
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • EmailSender(ILogger<EmailSender>, IOptionsMonitor<GlobalSettings>, IEventAggregator)
      • EmailSender(ILogger<EmailSender>, IOptionsMonitor<GlobalSettings>, IEventAggregator, INotificationHandler<SendEmailNotification>, INotificationAsyncHandler<SendEmailNotification>)
    • Methods
      • CanSendRequiredEmail()
      • SendAsync(EmailMessage, String)
      • SendAsync(EmailMessage, String, Boolean)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX