smtp/smtp: add MTA documentation

This commit is contained in:
Zack Schuster 2020-05-26 00:12:25 -07:00
parent 7344c5bd27
commit adabafc86d
2 changed files with 8 additions and 4 deletions

View File

@ -226,15 +226,15 @@ client.send(message, (err, message) => {
related // an array of attachments that you want to be related to the parent attachment
}
## new smtp.SMTPConnection(options)
## new smtp.SMTPConnection(options={})
// options is an object with the following keys
options =
{
user // username for logging into smtp
password // password for logging into smtp
host // smtp host
port // smtp port (if null a standard port number will be used)
host // smtp host (defaults to 'localhost')
port // smtp port (defaults to 25)
ssl // boolean or object {key, ca, cert} (if true or object, ssl connection will be made)
tls // boolean or object (if true or object, starttls will be initiated)
timeout // max number of milliseconds to wait for smtp responses (defaults to 5000)
@ -243,6 +243,8 @@ client.send(message, (err, message) => {
logger // override the built-in logger (useful for e.g. Azure Function Apps, where console.log doesn't work)
}
To target a Message Transfer Agent (MTA), omit all options.
## smtp.SMTPConnection#authentication
associative array of currently supported SMTP authentication mechanisms

View File

@ -116,7 +116,9 @@ export class SMTPConnection extends EventEmitter {
protected port: number;
/**
* SMTP class written using python's (2.7) smtplib.py as a base
* SMTP class written using python's (2.7) smtplib.py as a base.
*
* To target a Message Transfer Agent (MTA), omit all options.
*/
constructor({
timeout,