I want nodemailer to timeout at most in 45 seconds (instead of 2 minutes which is the default value), but connectiontimeout option seems not working and I don't know what the problem is.
I create a nodemailer transport connection like below:
const myMailer = nodemailer.createTransport({
host: 'mail.domain.com',
port: 465,
secure: true,
auth: {
user: 'username',
pass: 'password',
},
connectionTimeout: 45000,
});