Class EmailSender
A utility class for sending emails
Inheritance
System.Object
Assembly: cs.temp.dll.dll
Syntax
public class EmailSender : IEmailSender
Constructors
EmailSender(ILogger<EmailSender>, IOptions<GlobalSettings>, IEventAggregator)
Declaration
public EmailSender(ILogger<EmailSender> logger, IOptions<GlobalSettings> globalSettings, IEventAggregator eventAggregator)
Parameters
Type |
Name |
Description |
ILogger<EmailSender> |
logger |
|
IOptions<GlobalSettings> |
globalSettings |
|
IEventAggregator |
eventAggregator |
|
EmailSender(ILogger<EmailSender>, IOptions<GlobalSettings>, IEventAggregator, INotificationHandler<SendEmailNotification>, INotificationAsyncHandler<SendEmailNotification>)
Declaration
public EmailSender(ILogger<EmailSender> logger, IOptions<GlobalSettings> globalSettings, IEventAggregator eventAggregator, INotificationHandler<SendEmailNotification> handler1, INotificationAsyncHandler<SendEmailNotification> handler2)
Parameters
Type |
Name |
Description |
ILogger<EmailSender> |
logger |
|
IOptions<GlobalSettings> |
globalSettings |
|
IEventAggregator |
eventAggregator |
|
INotificationHandler<SendEmailNotification> |
handler1 |
|
INotificationAsyncHandler<SendEmailNotification> |
handler2 |
|
Methods
CanSendRequiredEmail()
Returns true if the application should be able to send a required application email
Declaration
public bool CanSendRequiredEmail()
Returns
Type |
Description |
System.Boolean |
|
SendAsync(EmailMessage, String)
Declaration
public async Task SendAsync(EmailMessage message, string emailType)
Parameters
Type |
Name |
Description |
EmailMessage |
message |
|
System.String |
emailType |
|
Returns
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