MailerModule

mailer. MailerModule

Mailer Module

Constructor

new MailerModule()

Source:

Extends

  • AbstractModule

Members

connectionUrl :String

Source:
Reference to the connectionUrl config value
Type:
  • String

isEnabled :Boolean

Source:
Reference to the isEnabled config value
Type:
  • Boolean

transporter :Nodemailer~Transport

Source:
The Nodemailer SMTP transport instance
Type:
  • Nodemailer~Transport

Methods

(async) init()

Source:

(async) send(data) → {Promise}

Source:
Sends an email
Parameters:
Name Type Description
data object The message data
Properties
Name Type Description
to object Comma separated list or an array of recipients email addresses that will appear on the To: field
subject object The subject of the email
text object The plain text version of the message as an unicode string
html object The HTML version of the message as a unicode string
Returns:
Type
Promise

(async) testConnection() → {Promise}

Source:
Checks the provided SMTP settings using nodemailer.verify.
Returns:
Type
Promise

(async) testEmailHandler(req, res, next)

Source:
Sends a test email. Can only be called from localhost
Parameters:
Name Type Description
req external:ExpressRequest The client request object
res external:ExpressResponse The server response object
next function The callback function