User Profile
milos95
Copper Contributor
Joined 3 years ago
User Widgets
Recent Discussions
How to send emails thru nodemailer (node.js) from outlook? SMTP Disabled
Hello, I'm writing a small backend node.js application from which I'd like to send emails. I set everything up in the following fashion: try { const transporter = nodemailer.createTransport({ host: "smtp.office365.com", port: 587, secure: false, // STARTTLS auth: { user: "email address removed for privacy reasons", pass: "secret-password", }, }); const mailOptions = { from: senderEmail, to: recipientEmail, subject: "Quote from Anonymous", text: JSON.stringify(storedFormData, null, 2), }; await transporter.sendMail(mailOptions); res.json({ message: "Email sent successfully." }); However, no matter how I change the structure of the code I keep getting the following error: code: 'EAUTH', response: '535 5.7.139 Authentication unsuccessful, SmtpClientAuthentication is disabled for the Tenant. Visit https://aka.ms/smtp_auth_disabled for more information. [FR2P281CA0043.DEUP281.PROD.OUTLOOK.COM 2023-09-05T20:12:25.431Z 08DBACD4F0020982]', responseCode: 535, command: 'AUTH LOGIN' So I guess my question is, how to enable SMTP for tenant?24KViews0likes6Comments
Recent Blog Articles
No content to show