MailerModule

mailer. MailerModule

Mailer Module

Constructor

new MailerModule()

Source:

Extends

  • AbstractModule

Members

connectionUrl :String

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

isEnabled :Boolean

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

transporter :Nodemailer~Transport

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

Methods

(async) init()

Source:

(async) send(data) → {Promise}

Description:
  • Sends an email
Source:
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}

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

(async) testEmailHandler(req, res, next)

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