27 lines
609 B
JavaScript
27 lines
609 B
JavaScript
var nodemailer = require('nodemailer');
|
|
|
|
//change email alone
|
|
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);
|
|
}
|
|
}); |