Class: EmailServiceProvider

EmailServiceProvider

(protected) new EmailServiceProvider(config)

EmailServiceProvider constructor to configure the SMTP connection.
Parameters:
Name Type Description
config Object Configuration for the nodemailer transporter object
Properties
Name Type Description
user string SMTP username
pass string SMTP password
host string SMTP hostname
port number SMTP port
secure boolean true if using TLS
Source:

Methods

sendEmail(details) → {Promise.<{result: Object, errors: Array.<EmailServiceError>}>}

Function to send an email.
Parameters:
Name Type Description
details Object Email message options
Properties
Name Type Attributes Description
from string The email address of the sender
to string | Array.<string> Comma separated list or an array of recipients email addresses that will appear on the To: field
cc string | Array.<string> <optional>
Comma separated list or an array of recipients email addresses that will appear on the Cc: field
bcc string | Array.<string> <optional>
Comma separated list or an array of recipients email addresses that will appear on the Bcc: field
subj string <optional>
The subject of the email
text string <optional>
The plaintext version of the message
html string <optional>
The HTML version of the message
Source:
Returns:
- A promise for sending the Email.
Type
Promise.<{result: Object, errors: Array.<EmailServiceError>}>