mirror of
https://github.com/nodemailer/wildduck.git
synced 2025-11-09 16:01:06 +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 tlsOptions = require('./tls-options');
|
||||||
const EventEmitter = require('events').EventEmitter;
|
const EventEmitter = require('events').EventEmitter;
|
||||||
const shared = require('nodemailer/lib/shared');
|
const shared = require('nodemailer/lib/shared');
|
||||||
|
const punycode = require('punycode');
|
||||||
|
|
||||||
const CLOSE_TIMEOUT = 1 * 1000; // how much to wait until pending connections are terminated
|
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
|
// Expose to the world
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ const tls = require('tls');
|
||||||
const tlsOptions = require('../../imap-core/lib/tls-options');
|
const tlsOptions = require('../../imap-core/lib/tls-options');
|
||||||
const shared = require('nodemailer/lib/shared');
|
const shared = require('nodemailer/lib/shared');
|
||||||
const POP3Connection = require('./connection');
|
const POP3Connection = require('./connection');
|
||||||
|
const punycode = require('punycode');
|
||||||
|
|
||||||
const CLOSE_TIMEOUT = 1 * 1000; // how much to wait until pending connections are terminated
|
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() {
|
_setListeners() {
|
||||||
this.server.on('listening', () => this._onListening());
|
this.server.on('listening', () => this._onListening());
|
||||||
this.server.on('close', () => this._onClose());
|
this.server.on('close', () => this._onClose());
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue