The module that handles the email delivery.
Imports
Environment Variables
SMTP_HOST
The SMTP host.
SMTP_PORT
The SMTP port.
SMTP_SECURE
The SMTP secure.
SMTP_USERNAME
The SMTP username.
SMTP_PASSWORD
The SMTP password.
Write .env
file with environment variable. Below has an example:
Method of Use
To use this module, you need to inject it into the desired service.
Injecting the module into our service.
With dependencies
You will need to inject the following interfaces.
IConfigurationService
IValidatorRegexpService
IStringExService
IAwsCoreService
IAwsConfigurationService
IAwsStsService
Properties
_pathTemplates
private
The path where the templates are located.
_strategy
private
The strategy to use to send the email.
_from
private
The sender of the email.
_priority
private
The priority of the email.
_cc
private
The CC (Carbon Copy) of the email.
_cco
private
The CCO (Carbon Copy Hidden) of the email.
get pathTemplates
public
Set the path where the templates are located.
get pathTemplates
public
Get the path where the templates are located.
set strategy
public
Set the strategy to use to send the email.
get strategy
public
Get the strategy to use to send the email.
set from
public
Set the sender of the email.
get from
public
Get the sender of the email.
set priority
public
Set the priority of the email.
get priority
public
Get the priority of the email.
set cc
public
Set the CC (Carbon Copy) of the email.
get cc
public
Get the CC (Carbon Copy) of the email.
set cco
public
Set the CCO (Carbon Copy Hidden) of the email.
get cco
public
Get the CCO (Carbon Copy Hidden) of the email.
Methods
resetCC
public
Reset list the CC (Carbon Copy) of the email.
resetCCO
public
Reset list the CCO (Carbon Copy Hidden) of the email.
test
public
Send a test email.
send
public
Send an email.
Last updated