NETXMS EMAIL NOTIFICATION - OFFICE365

Started by ruidias, April 02, 2024, 12:34:08 PM

Previous topic - Next topic

ruidias

Hello everyone,

I've searched the forum and although I've found a few posts I haven't been able to find a solution for sending notification emails using the Office365 servers.

Example of my configuration:
Server=smtp.office365.com
[email protected]
Password=##########
Port=587
TLSMode=STARTTLS
RetryCount=1
FromName=Account Name
[email protected]
MailEncoding=utf8
IsHTML=yes


How did you encrypt the password? There's some help in the manual, but I'm not sure what kind of encryption Office365 uses.

Are these the right settings or is something missing? When i try to send a email i get DRIVER ERROR



Filipp Sudanov

Try issuing
debug nc 8
debug ncd.* 8

in Tools->Server Debug Console. Then try to send another email and show what you have in your server log (/var/log/netxmsd on Linux)

ruidias

2024.04.03 08:38:18.202 *D* [ncd.smtp          ] Call to curl_easy_perform("smtp://smtp.office365.com:587") failed (67: Login denied)
2024.04.03 08:38:18.202 *D* [nc                ] Driver error for channel "SMTP HTML OFFICE365", message dropped

I try the password as plain text and encrypted with nxencpasswd ..

Filipp Sudanov

The password should normally work unencrypted. The only exception is when the password itself is base-64 encoded and has specific length (44 or 88 characters) - in this case NetXMS will think that it's something encripted by nxencpasswd - in this case the workaround is to actually encrypt it with nxencpasswd.
Also, double-check the "Login" field.

MarcusH

To send mail with authenticated SMTP with 365 user the account has to have that function enabled.
Since it is big security issue for bigger organisations that function is most likely disabled.