mscdex / node-imap

An IMAP client module for node.js.
MIT License
2.14k stars 379 forks source link

fix issue when servername not match the hsot. the certificate will got an error with ERR_TLS_CERT_ALTNAME_INVALID #887

Open lotuswalking opened 1 year ago

lotuswalking commented 1 year ago

fix issue when servername not match the hsot. the certificate will got an error with ERR_TLS_CERT_ALTNAME_INVALID

  var imap = new Imap({
  user: "username",
  password: "password",
  host: "hostname/ipaddress",
  servername: "server fqdn", //optional
  port: port,
  tls: true,
});
masroorejaz commented 1 year ago

Is it working fine at your end after these changes?

Also what should I enter in host and server name. For example my main server is "server.abc.com" and mail server is "mail.abc.com" what and where should I enter these. Cause currently even after making all these changes it's still not working.