ditesh / node-poplib

POP3 client library for Node.js
MIT License
128 stars 44 forks source link

Hoe to use Key and Certificates #31

Open Dsiddhesh opened 4 years ago

Dsiddhesh commented 4 years ago

Hi Team,

I intend to fetch email from Email server which is TLS enabled and accepts Key and Cert file for authentication. Since in poplib documentation there was no mention about this usecase I was checking poplib python libraries and found that we need to send key and cert during initializing pop client. I tried below code but I get connection errors. Can any one guide me in this case.

var keyfile = fs.readFileSync("./ANw653yR85W_cWKnk_key.pem"); var certfile = fs.readFileSync("./ANw653yR85W_cWKnk_cert.pem"); var client = new POP3Client(port, host, true, keyfile, certfile,{ ignoretlserrs: false, enabletls: true, debug: true });