Added missing method

This commit is contained in:
Andris Reinman 2017-10-05 15:48:10 +03:00
parent 40b9214a15
commit abdc5e2bbe
2 changed files with 10 additions and 0 deletions

View file

@ -6,6 +6,7 @@ const IMAPConnection = require('./imap-connection').IMAPConnection;
const tlsOptions = require('./tls-options');
const EventEmitter = require('events').EventEmitter;
const shared = require('nodemailer/lib/shared');
const punycode = require('punycode');
const CLOSE_TIMEOUT = 1 * 1000; // how much to wait until pending connections are terminated
@ -266,6 +267,10 @@ class IMAPServer extends EventEmitter {
}
}
}
_normalizeHostname(hostname) {
return punycode.toUnicode((hostname || '').toString().trim()).toLowerCase();
}
}
// Expose to the world

View file

@ -6,6 +6,7 @@ const tls = require('tls');
const tlsOptions = require('../../imap-core/lib/tls-options');
const shared = require('nodemailer/lib/shared');
const POP3Connection = require('./connection');
const punycode = require('punycode');
const CLOSE_TIMEOUT = 1 * 1000; // how much to wait until pending connections are terminated
@ -144,6 +145,10 @@ class POP3Server extends EventEmitter {
}
}
_normalizeHostname(hostname) {
return punycode.toUnicode((hostname || '').toString().trim()).toLowerCase();
}
_setListeners() {
this.server.on('listening', () => this._onListening());
this.server.on('close', () => this._onClose());