简体   繁体   中英

Started to get error using nodemailer and mandrill smtp. CERT_HAS_EXPIRED Error: certificate has expired

We are using nodemailer and mandrill smtp.

Started today we got this error for few different web services

Error: { [Error: certificate has expired] code: 'CERT_HAS_EXPIRED' }

It happens for localhost and remote servers for different web applications What can be the reason?


this was a problem on mandrill side

UPDATE

Expired Certificate Errors A roll out of new certificates last week has caused some users to experience problems sending mail—this was due to the expiration of the old certificate and an issue in our configuration. The users effected were sending through SMTP with STARTTLS. HTTPS API calls were not affected. We are currently working on a fix and will update when resolved. 12:21 PM UTC The configuration error was corrected at 12:05 UTC. SMTP with STARTTLS is now working correctly in all regions. December 18, 2015 12:04 PM UTC

I was getting same error. Use below in transport config :

tls: {rejectUnauthorized: false},

For Example :

var transporter = nodemailer.createTransport({
host: 'smtp.example.com',
port: 587,
auth: {
    user: 'username',
    pass: 'userpassword'
},
tls: {rejectUnauthorized: false} });

Also: http://status.mandrillapp.com/

18 Dec some certificates of theirs expired

Add this at the top of your file:

process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';t

Warning This disables HTTPS / SSL / TLS checking across your entire node.js environment. Please see the solution using an https agent below.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM