Class Transport

Class Summary
Constructor Attributes Constructor Name and Description
 
Transport(type, options)

Generates a Transport object that can be used to deliver e-mail.

Method Summary

Class Detail

Transport(type, options)

Generates a Transport object that can be used to deliver e-mail.

All transport objects need to have sendMail property defined and if needed, also an close method

Parameters:
{String} type
The type of the transport, currently available: SMTP, SES and Sendmail
options

Method Detail

  • close(Callback)

    Closes the transport when needed, useful with SMTP (which uses connection pool) but not so much with SES or Sendmail

    Parameters:
    {Function} Callback
    function to run when the connection is closed
  • sendMail(emailMessage, callback)

    Forwards the generated mailcomposer object to the selected transport object for message delivery

    Parameters:
    {Object} emailMessage
    MailComposer object
    {Function} callback
    Callback function to run when the sending is completed