Planethoster support helped me to understand what was going wrong. I wan't to let this here as I think I won't be the only one to use share hosting for mailing.
In fact, my mail server is on a shared hosting at Planethoster. Thus, the certificate is only for the hosting machine name. Here it is world-346.fr.planethoster.net
So I resolved the problem by setting my configuration like this:
{
transport: {
// Removed the unecessary cert loading
// key: [ readFileSync(__dirname + '/../../../../cert.pem') ],
host: world-346.fr.planethoster.net, // The host is now the shared machine
auth: {
user: USER,
pass: PWD
}
}
}
The host machine is now OK with the given hostname as it is included in its certificate.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…