mirror of
https://github.com/nodemailer/wildduck.git
synced 2025-01-04 07:02:45 +08:00
Added missing method
This commit is contained in:
parent
40b9214a15
commit
abdc5e2bbe
2 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue