Skip to main content

MailerParameters

@webda/mailer


Class: MailerParameters

Defined in: mailer/src/mailer.service.ts:23

Parameters for the Mailer service configuration

Configures the email transport and where templates are rendered from

Secret​

auth.pass,SES.credentials - nodemailer transport options to encrypt with webda config encrypt

Extends​

  • ServiceParameters

Constructors​

Constructor​

new MailerParameters(): MailerParameters

Returns​

MailerParameters

Inherited from​

ServiceParameters.constructor

Properties​

emailTemplateOptions?​

optional emailTemplateOptions?: object

Defined in: mailer/src/mailer.service.ts:51

Rendering options

juiceResources?​

optional juiceResources?: any

juice juiceResources options used to inline the CSS of the html part

Deep merged over the email-templates defaults: { applyStyleTags: false, removeStyleTags: false, webResources: { images: false, relativeTo } }, webResources.relativeTo being the templates folder

See​

https://github.com/Automattic/juice


sender​

sender: string

Defined in: mailer/src/mailer.service.ts:47

Define the default sender


SES?​

optional SES?: any

Defined in: mailer/src/mailer.service.ts:72

SES AWS Bean if transport === "ses"

Credentials inside can be encrypted with webda config encrypt


templates?​

optional templates?: string

Defined in: mailer/src/mailer.service.ts:31

Folder containing the mailer templates

When set (or when templatesEngine is set), the mailer renders with its own renderer on this folder, even if a TemplateService is configured. Left unset, the templateService is used if it exists, otherwise ./templates


templatesEngine?​

optional templatesEngine?: string

Defined in: mailer/src/mailer.service.ts:37

Template engine to use with the mailer own renderer, mustache when unset

Setting it makes the mailer use its own renderer, like templates


templateService?​

optional templateService?: string

Defined in: mailer/src/mailer.service.ts:43

Name of the TemplateService to render with when neither templates nor templatesEngine are set

Default​

"TemplateService"

transport?​

optional transport?: string

Defined in: mailer/src/mailer.service.ts:66

Define the type of transport to use


type​

type: string

Defined in: core/lib/services/serviceparameters.d.ts:9

Type of the service

Inherited from​

ServiceParameters.type

Methods​

load()​

load(params?): this

Defined in: mailer/src/mailer.service.ts:83

Load and apply defaults to the mailer parameters

templates and templatesEngine stay undefined when not configured: being set is what makes the mailer use its own renderer instead of the TemplateService

Parameters​

params?​

any = {}

Raw parameters to load

Returns​

this

this instance with defaults applied

Overrides​

ServiceParameters.load


update()​

update(params, delta): this

Defined in: core/lib/application/parameters.d.ts:21

Update parameters and call watchers if a parameter was changed

Parameters​

params​

any

the service parameters

delta​

any

the delta

Returns​

this

this for chaining

Inherited from​

ServiceParameters.update


with()​

with(callback): this

Defined in: core/lib/application/parameters.d.ts:27

Watch for changes on the parameters and call watchers when a parameter is changed

Parameters​

callback​

(params) => void

the callback function

Returns​

this

this for chaining

Inherited from​

ServiceParameters.with