Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var nodemailer = require('nodemailer');
- https.globalAgent.options.secureProtocol = "SSLv3_method";
- var smtpTransport = nodemailer.createTransport("SMTP",{
- host: 'smtp.office365.com',
- port: '995',
- auth: { user: 'btcadmin', pass: '66whodat#@' },
- secureConnection: 'false',
- tls: { ciphers: 'SSLv3' }
- });
- { [Error: Invalid greeting from server - +OK The Microsoft Exchange POP3 service is ready. [TOKEN]]
- data: '+OK The Microsoft Exchange POP3 service is ready. [TOKEN]',
- stage: 'greeting' }
- var mailOpts = {
- from: "***@MICROSOFT-DOMAIN.com",
- to: "******@gmail.com",
- cc: "ME@gmail.com",
- subject: "please work",
- 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).",
- attachments: [{
- filename:"ICS.ics",
- filePath: "./ICS.ics",
- contentType: "text/calendar",
- method: "request"
- }]
- };
- smtpTransport.sendMail(mailOpts, function (a, b) { //err, null
- console.log(a);
- console.log(b);
- sendJsonResponse(res, 200, "It worked?");
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement