Wednesday, 27 November 2019

Nodemailer Not Working Properly

Hey everyone, I am having an issue with a code I am writing. I am developing a code to act as a login screen that compares that input to a MySQL server and database. Everything is working wonderfully, but the issue I am having is when someone access the New User page and submits their info to the database, I am trying to send an email that will give the new user an authentication number they have to submit. But every change I make to my code with nodemailer, it won't send the email. The data is still submitted to the server, just no email is sent.My portion of the code that I am trying to work on:var transporter = nodemailer.createTransport({host: "smtp-mail.outlook.com",port: 587,secureConnection: false,secure: true,ignoreTLS: false,requireTLS: true,auth: {user: 'user',pass: 'pass'},tls: {ciphers: 'SSLv3'}});var mailOptions = {from: 'user',to: email,subject: 'Please Verify Your Account!',text: authenticationNumber};transporter.sendMail(mailOptions, function(err, info) {if(err) {console.log(err);} else {console.log(info.response);}});​The error I am getting is this:[Error: 3408:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:332:] {library: 'SSL routines',function: 'ssl3_get_record',reason: 'wrong version number',code: 'ESOCKET',command: 'CONN'}​I have tried looking on Google and anywhere I can find to solve this issue, but I haven't been able to find anything for the past 2 weeks. Any help would be much appreciated.

Submitted November 27, 2019 at 02:25PM by Caddburry00

No comments:

Post a Comment