Support for smtp.office365.com

Hi Team,

Does opensearch support smtp.office365.com ? I am sure it supports smtp.gmail.com for a Gmail account.

I have tried to configure smtp.office365.com i am getting unknown error in the UI

Screen Shot 2022-06-13 at 2.32.54 PM

I have all_access admin backend role.

Thanks.

Same errore here for office365, but if I use STARTTLS option in the sender options I get “Client not authenticated to send mail” error, even adding in the keystore the following entry:
opensearch.notifications.core.email.sender_name.username
opensearch.notifications.core.email.sender_name.password

@nicoemanuelli It worked for me with office365.

image

Did you follow these settings in the SMTP sender?

image

Also, these should reflect the name of the SMTP sender that you’ve created in the UI.

opensearch.notifications.core.email.pawel.username
opensearch.notifications.core.email.pawel.password

image

And last one, restart OpenSearch nodes after adding the above values to the keystore.

I followed the settings. But in seder settings if I use TLS I got error 424 “Could not connect to SMTP host: smtp.office365.com, port: 587”. Network is ok and I can successfully send email via cli.
If I use STARTTLS I got error 502 “Client not authenticated to send mail”.
I didn’t restart nodes but I posted the reload_secure_settings API.

@nicoemanuelli I’ve tested that with 2.9.0. I’ve just noticed that it doesn’t work in 2.11.1.
However, my Outlook email worked with 2.11.1 using the following SMTP settings.

host: smtp-mail.outlook.com
port: 587
encryption-method: STARTTLS

image
image

Thank you pablo, but same error also with your updated settings:

“status_code”:“502”,“status_text”:"sendEmail Error, status:530 5.7.57 Client not authenticated to send mail.

I’m missing something. Maybe keystore not working correctly

@nicoemanuelli Did you use opensearch-kesytore binary to add the values?
i.e.

/usr/share/opensearch/bin/opensearch-keystore add opensearch.notifications.core.email.<smtp_sender_name>.username

Also, my username is the email address of my mailbox. Did you use the same format?

Yep, same command.
I will check with office365 tenant admin if any authorization is missing.

Thanks for you support
Nico

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.