commit f850a5dee14a3a13950b1be5c6156ba7f02aac96 Author: anbu Date: Tue Aug 20 15:47:27 2024 +0530 email working node with frontlinetech SMTP diff --git a/README.md b/README.md new file mode 100644 index 0000000..7149315 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +Great Start \ No newline at end of file diff --git a/myfirst.js b/myfirst.js new file mode 100644 index 0000000..4d8f157 --- /dev/null +++ b/myfirst.js @@ -0,0 +1,26 @@ +var nodemailer = require('nodemailer'); + +var transporter = nodemailer.createTransport({ + host: "mail.frontlinetech.in", + port: 465, + secure: true, // upgrade later with STARTTLS + auth: { + user: "noreply@frontlinetech.in", + pass: ")P2g)LLQ%%~U", + }, +}); + +var mailOptions = { + from: 'noreply@frontlinetech.in', + to: 'sumesh@frontlinetech.in', + subject: 'Sending Email using Node.js', + text: 'That was easy!' +}; + +transporter.sendMail(mailOptions, function(error, info){ + if (error) { + console.log(error); + } else { + console.log('Email sent: ' + info.response); + } +}); \ No newline at end of file