nodemailer error: self signed certificate in certificate chain
Ok so it was because of the Anti-Virus software. i swear things like this make me feel like quitting.
Same was with me. My antivirus is AVG. Instead of turning the antivirus off in AVG you can go to Settings>Components>Email Shield>Customize>SSL Scanning and uncheck "Scan SSL connections".
In Avast Go Settings/Protection/Core Shields/Configure shield settings/Mail Shieldand uncheck "Scan outbound emails (SMTP)"