Watcher Email Configuration not able to send mail:

Continuing the discussion from Watcher email configuration:

1)I am facing this Issue while testing Mail through watcher:


2)This is yml configuration:
image
3)Secure Password:

For the Email Configuration i have done 2 and 3 steps.Is there any more thing required.

Your step 2) elasticsearch.yml
Is not formatted correctly. You need to indent correctly see the example use only spaces yml needs to be exact.

https://www.elastic.co/guide/en/elasticsearch/reference/current/actions-email.html#outlook


Still getting this error can you please help me to fix.

As you can see in the logs the credentials are not accepted.

As instructed in the docs you are required to put the secure_password in the keystore. You cannot put it in the yml.

https://www.elastic.co/guide/en/elasticsearch/reference/current/actions-email.html#gmail

Since it looks like you are using elastic cloud see here for how to put that in keystore.

https://www.elastic.co/guide/en/cloud/current/ec-configuring-keystore.html

add

xpack.notification.email.account.gmail_account.smtp.secure_password

password

You may also need to follow the docs about Gmail authentication

If you get an authentication error that indicates that you need to continue the sign-in process from a web browser when Watcher attempts to send email, you need to configure Gmail to Allow Less Secure Apps to access your account.

I have done this also then also not able to get success.

xpack.notification.email.account.gmail_account.smtp.secure_password

password

can you please help

What is the error now?

Please do not provide Screen shot of error log, paste in the text and format with </>

Have you looked at the URL that google provided in the error log.

https://support.google.com/mail?p=BadCredentials

Elastic Is Trying to connect but Google is saying Bad Credentials

You need to dig around a bit....