Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var nodemailer = require('nodemailer');
- var transporter = nodemailer.createTransport({
- host: "smtp-mail.outlook.com", // hostname
- secureConnection: false, // TLS requires secureConnection to be false
- port: 587, // port for secure SMTP
- tls: {
- ciphers:'SSLv3'
- },
- auth: {
- user: 'saurath@inautix.co.in',
- pass: 'Bapul&123s'
- }
- });
- var mailOptions = {
- from: 'saurath@inautix.co.in',
- to: 'saurath@inautix.co.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);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement