MailerParameters
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
args?
optionalargs?:string[]
Defined in: mailer/src/mailer.service.ts:180
Extra arguments for the sendmail command
auth?
optionalauth?:any
Defined in: mailer/src/mailer.service.ts:124
Authentication data for the transport (auth.pass can be encrypted with webda config encrypt)
authMethod?
optionalauthMethod?:string
Defined in: mailer/src/mailer.service.ts:128
Preferred authentication method
buffer?
optionalbuffer?:boolean
Defined in: mailer/src/mailer.service.ts:188
Return a Buffer instead of a stream for streamTransport
connectionTimeout?
optionalconnectionTimeout?:number
Defined in: mailer/src/mailer.service.ts:108
Milliseconds to wait for the connection to establish
dkim?
optionaldkim?:any
Defined in: mailer/src/mailer.service.ts:140
DKIM configuration options
dnsTimeout?
optionaldnsTimeout?:number
Defined in: mailer/src/mailer.service.ts:120
Milliseconds to wait for DNS resolution
emailTemplateOptions?
optionalemailTemplateOptions?:object
Defined in: mailer/src/mailer.service.ts:51
Rendering options
juiceResources?
optionaljuiceResources?: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
greetingTimeout?
optionalgreetingTimeout?:number
Defined in: mailer/src/mailer.service.ts:112
Milliseconds to wait for the greeting after connection is established
host?
optionalhost?:string
Defined in: mailer/src/mailer.service.ts:76
SMTP server hostname or IP address
ignoreTLS?
optionalignoreTLS?:boolean
Defined in: mailer/src/mailer.service.ts:88
Turns off STARTTLS support if true
jsonTransport?
optionaljsonTransport?:boolean
Defined in: mailer/src/mailer.service.ts:192
Return a JSON string representation of the message
localAddress?
optionallocalAddress?:string
Defined in: mailer/src/mailer.service.ts:104
Local interface to bind to for network connections
maxConnections?
optionalmaxConnections?:number
Defined in: mailer/src/mailer.service.ts:156
Count of maximum simultaneous connections to make against the SMTP server
maxMessages?
optionalmaxMessages?:number
Defined in: mailer/src/mailer.service.ts:160
Limits the message count to be sent using a single connection
name?
optionalname?:string
Defined in: mailer/src/mailer.service.ts:100
Optional hostname of the client, used for identifying to the server
newline?
optionalnewline?:string
Defined in: mailer/src/mailer.service.ts:184
Line ending style ("unix" or "windows") for sendmail or stream transport
opportunisticTLS?
optionalopportunisticTLS?:boolean
Defined in: mailer/src/mailer.service.ts:96
Attempts to upgrade the connection to TLS when advertised by the server
path?
optionalpath?:string
Defined in: mailer/src/mailer.service.ts:176
Path to the sendmail command
pool?
optionalpool?:boolean
Defined in: mailer/src/mailer.service.ts:152
Use pooled connections instead of creating a new connection for every email
port?
optionalport?:number
Defined in: mailer/src/mailer.service.ts:80
SMTP port to connect to (defaults to 587 if secure is false or 465 if true)
proxy?
optionalproxy?:string
Defined in: mailer/src/mailer.service.ts:136
Proxy URL for SMTP connections
rateDelta?
optionalrateDelta?:number
Defined in: mailer/src/mailer.service.ts:164
Defines the time measuring period in milliseconds for rate limiting
rateLimit?
optionalrateLimit?:number
Defined in: mailer/src/mailer.service.ts:168
Limits the message count to be sent in rateDelta time
requireTLS?
optionalrequireTLS?:boolean
Defined in: mailer/src/mailer.service.ts:92
Forces the client to use STARTTLS if true
secure?
optionalsecure?:boolean
Defined in: mailer/src/mailer.service.ts:84
If true the connection uses TLS when connecting to server; if false then TLS is used if server supports the STARTTLS extension
sender?
optionalsender?:string
Defined in: mailer/src/mailer.service.ts:47
Define the default sender
sendmail?
optionalsendmail?:boolean
Defined in: mailer/src/mailer.service.ts:172
Use sendmail transport
service?
optionalservice?:string
Defined in: mailer/src/mailer.service.ts:144
Well-known service name for nodemailer
SES?
optionalSES?:any
Defined in: mailer/src/mailer.service.ts:72
SES AWS Bean if transport === "ses"
Credentials inside can be encrypted with webda config encrypt
skipEncoding?
optionalskipEncoding?:boolean
Defined in: mailer/src/mailer.service.ts:196
Skip JSON encoding in jsonTransport
socketTimeout?
optionalsocketTimeout?:number
Defined in: mailer/src/mailer.service.ts:116
Milliseconds of inactivity to allow before timing out the socket
streamTransport?
optionalstreamTransport?:boolean
Defined in: mailer/src/mailer.service.ts:200
Return a stream instead of sending the message
templates?
optionaltemplates?: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?
optionaltemplatesEngine?: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?
optionaltemplateService?: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"
tls?
optionaltls?:any
Defined in: mailer/src/mailer.service.ts:132
Additional node.js TLSSocket options to be passed to the socket constructor
transport?
optionaltransport?: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
url?
optionalurl?:string
Defined in: mailer/src/mailer.service.ts:148
Connection URL for SMTP configuration
Methods
load()
load(
params?):this
Defined in: mailer/src/mailer.service.ts:211
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