var nodemailer = require('nodemailer');
var transporter = nodemailer.createTransport({
host: "smtp-mail.outlook.com",
secureConnection: false,
port: 587,
tls: {
ciphers:'SSLv3'
},
auth: {
user: 'mymail@outlook.com',
pass: 'myPassword'
}
});
var mailOptions = {
from: '"Our Code World " <mymail@outlook.com>',
to: 'mymail@mail.com, mymail2@mail.com',
subject: 'Hello ',
text: 'Hello world ',
html: '<b>Hello world </b><br> This is the first email sent with Nodemailer in Node.js'
};
transporter.sendMail(mailOptions, function(error, info){
if(error){
return console.log(error);
}
console.log('Message sent: ' + info.response);
});