Advertisement
Guest User

Untitled

a guest
May 17th, 2016
380
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. var nodemailer = require('nodemailer');
  2. https.globalAgent.options.secureProtocol = "SSLv3_method";
  3. var smtpTransport = nodemailer.createTransport("SMTP",{
  4. host: 'smtp.office365.com',
  5. port: '995',
  6. auth: { user: 'btcadmin', pass: '66whodat#@' },
  7. secureConnection: 'false',
  8. tls: { ciphers: 'SSLv3' }
  9. });
  10.  
  11. { [Error: Invalid greeting from server - +OK The Microsoft Exchange POP3 service is ready. [TOKEN]]
  12. data: '+OK The Microsoft Exchange POP3 service is ready. [TOKEN]',
  13. stage: 'greeting' }
  14.  
  15. var mailOpts = {
  16. from: "***@MICROSOFT-DOMAIN.com",
  17. to: "******@gmail.com",
  18. cc: "ME@gmail.com",
  19. subject: "please work",
  20. text: "nodemailer2.3.1 SMTP transporter plain text, vevent gen'd w/ icalevent, ical headers, no utf-8, request ical type, fs.write callback w/ CC, attached through file path array, gmail client (less secure enabled).",
  21. attachments: [{
  22. filename:"ICS.ics",
  23. filePath: "./ICS.ics",
  24. contentType: "text/calendar",
  25. method: "request"
  26. }]
  27. };
  28.  
  29. smtpTransport.sendMail(mailOpts, function (a, b) { //err, null
  30. console.log(a);
  31. console.log(b);
  32. sendJsonResponse(res, 200, "It worked?");
  33. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement