Show / Hide Table of Contents

Class EmailSenderBase

This class can be used as base to implement IEmailSender.

Inheritance
System.Object
EmailSenderBase
NullEmailSender
SmtpEmailSender
MailKitSmtpEmailSender
Implements
IEmailSender
Namespace: Volo.Abp.Emailing
Assembly: Volo.Abp.Emailing.dll
Syntax
public abstract class EmailSenderBase : object, IEmailSender

Constructors

EmailSenderBase(IEmailSenderConfiguration, IBackgroundJobManager)

Constructor.

Declaration
protected EmailSenderBase(IEmailSenderConfiguration configuration, IBackgroundJobManager backgroundJobManager)
Parameters
Type Name Description
IEmailSenderConfiguration configuration
IBackgroundJobManager backgroundJobManager

Properties

BackgroundJobManager

Declaration
protected IBackgroundJobManager BackgroundJobManager { get; }
Property Value
Type Description
IBackgroundJobManager

Configuration

Declaration
protected IEmailSenderConfiguration Configuration { get; }
Property Value
Type Description
IEmailSenderConfiguration

Methods

NormalizeMailAsync(MailMessage)

Normalizes given email. Fills if it's not filled before. Sets encodings to UTF8 if they are not set before.

Declaration
protected virtual Task NormalizeMailAsync(MailMessage mail)
Parameters
Type Name Description
MailMessage mail

Mail to be normalized

Returns
Type Description
Task

QueueAsync(String, String, String, Boolean)

Declaration
public virtual Task QueueAsync(string to, string subject, string body, bool isBodyHtml = true)
Parameters
Type Name Description
System.String to
System.String subject
System.String body
System.Boolean isBodyHtml
Returns
Type Description
Task

QueueAsync(String, String, String, String, Boolean)

Declaration
public Task QueueAsync(string from, string to, string subject, string body, bool isBodyHtml = true)
Parameters
Type Name Description
System.String from
System.String to
System.String subject
System.String body
System.Boolean isBodyHtml
Returns
Type Description
Task

SendAsync(MailMessage, Boolean)

Declaration
public virtual Task SendAsync(MailMessage mail, bool normalize = true)
Parameters
Type Name Description
MailMessage mail
System.Boolean normalize
Returns
Type Description
Task

SendAsync(String, String, String, Boolean)

Declaration
public virtual Task SendAsync(string to, string subject, string body, bool isBodyHtml = true)
Parameters
Type Name Description
System.String to
System.String subject
System.String body
System.Boolean isBodyHtml
Returns
Type Description
Task

SendAsync(String, String, String, String, Boolean)

Declaration
public virtual Task SendAsync(string from, string to, string subject, string body, bool isBodyHtml = true)
Parameters
Type Name Description
System.String from
System.String to
System.String subject
System.String body
System.Boolean isBodyHtml
Returns
Type Description
Task

SendEmailAsync(MailMessage)

Should implement this method to send email in derived classes.

Declaration
protected abstract Task SendEmailAsync(MailMessage mail)
Parameters
Type Name Description
MailMessage mail

Mail to be sent

Returns
Type Description
Task

Implements

IEmailSender

Extension Methods

AbpObjectExtensions.As<T>(Object)
AbpObjectExtensions.To<T>(Object)
AbpObjectExtensions.IsIn<T>(T, T[])
AbpObjectExtensions.If<T>(T, Boolean, Func<T, T>)
AbpObjectExtensions.If<T>(T, Boolean, Action<T>)
LockExtensions.Locking(Object, Action)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<TResult>(Object, Func<TResult>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
Back to top Powered by Volosoft