new Emailer(config)
Create the service
Parameters:
Name | Type | Description |
---|---|---|
config |
object | Configuration |
Members
-
<static> provides :string
-
Service name is 'emailer'
Type:
- string
-
<static> requires :Array.<string>
-
Dependencies as constructor arguments
Type:
- Array.<string>
Methods
-
<async> send(params)
-
Send email
Parameters:
Name Type Description params
object Parameters Properties
Name Type Argument Description server
string <optional>
SMTP server name (as in config) from
string From address to
string To address cc
string <optional>
CC address subject
string The subject text
string <optional>
Plain text variant of the message html
string <optional>
Html variant of the message attachments
Array.<object> <optional>
Array of objects (see emailjs help) Returns:
Resolves to the sent message details- Type
- Promise
-
_connect(server)
-
Create connection instance
Parameters:
Name Type Default Description server
string 'main' SMTP server name Returns:
Returns emailjs instance- Type
- object