Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
446
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. var nodemailer = require('nodemailer');
  2. var transporter = nodemailer.createTransport({
  3. host: "smtp-mail.outlook.com", // hostname
  4. secureConnection: false, // TLS requires secureConnection to be false
  5. port: 587, // port for secure SMTP
  6. tls: {
  7. ciphers:'SSLv3'
  8. },
  9. auth: {
  10. user: 'saurath@inautix.co.in',
  11. pass: 'Bapul&123s'
  12. }
  13. });
  14.  
  15. var mailOptions = {
  16. from: 'saurath@inautix.co.in',
  17. to: 'saurath@inautix.co.in',
  18. subject: 'Sending Email using Node.js',
  19. text: 'That was easy!'
  20. };
  21.  
  22. transporter.sendMail(mailOptions, function(error, info){
  23. if (error) {
  24. console.log(error);
  25. } else {
  26. console.log('Email sent: ' + info.response);
  27. }
  28. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement