parse-smtp-template icon indicating copy to clipboard operation
parse-smtp-template copied to clipboard

TLS error for self-signed certificates

Open oproulx opened this issue 11 months ago • 0 comments

Started getting the following error:

Error: self-signed certificate
    at TLSSocket.onConnectSecure (node:_tls_wrap:1535:34)
    at TLSSocket.emit (node:events:513:28)
    at TLSSocket.emit (node:domain:489:12)
    at TLSSocket._finishInit (node:_tls_wrap:949:8)
    at ssl.onhandshakedone (node:_tls_wrap:733:12)

Looks like this is due to gmail having self-signed certificates. The following fix solves the issue:

tls: {
      minVersion: 'TLSv1',
      rejectUnauthorized: false // This is required since google self-signs their cert
    }

However, it could be good for the module to have the tls settings configurable.

oproulx avatar Mar 20 '24 01:03 oproulx