Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 375
Nedudi Avatar asked Dec 18 '15 11:12

Nedudi


1 Answers

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} });
like image 148
Arvind Kushwaha Avatar answered Oct 25 '22 07:10

Arvind Kushwaha