API Docs for: 2.6
Show:

mailer Class

Module: mailer

Provides the mail functionalities.

Item Index

Methods

Methods

config

(
  • path
)

Configurates by a configuration file that must use the JSON syntax.

The method can throw an Exception.

Parameters:

  • path String

    The path of the configuration file

send

(
  • to
  • subject
  • body
  • cb
)

Sends an email.

Parameters:

  • to String

    The destination email address

  • subject String

    The subject of the email

  • body String

    The body of the email

  • cb Function

    The callback function

setLogger

(
  • log
)
static

Set the logger to be used.

Parameters:

  • log Object

    The logger object. It must have at least three methods: info, warn and error as console object.

Properties

address

String private

The address of the mail server. It can be customized by the configuration file.

Default: "localhost"

IDLOG

String private final

The module identifier used by the logger.

Default: [mailer]

logger

Object private

The logger. It must have at least three methods: info, warn and error.

Default: console

port

String private

The mail server port. It can be customized by the configuration file.

Default: "25"

sender

String private

The email address of the sender. It can be customized by the configuration file.

Default: "nethcti@mycompany.local"