"missing required email account setting for account [gmail]. 'smtp.host' must be configured

I have added below lines in elasticsearch.yml file

xpack.notification.email.account:
    gmail_account:
        profile: gmail
        smtp:
            auth: true
            starttls.enable: true
            host: smtp.gmail.com
            port: 587
            user: XXXXXXXXXXX

and also added password using below command
bin/elasticsearch-keystore add xpack.notification.email.account.gmail.smtp.secure_password

And restarted the elastic search and kibana
both restarted but when i am trying to send the test mail under watcher it is giving an issue.

response from api call:
"actions":[
{
"id":"email_1",
"type":"email",
"status":"failure",
"error":{
"root_cause":[
{
"type":"settings_exception",
"reason":"missing required email account setting for account [gmail]. 'smtp.host' must be configured"
}
],
"type":"settings_exception",
"reason":"missing required email account setting for account [gmail]. 'smtp.host' must be configured"
}
}
]

can someone please help ?

Hi @Dhyanesh_Naik you did not format your code above with the </> button so it is hard to tell if it is correct.

Also can you show how you sent the test email?

Hi Stephen,

Thank you for the quick response.
I found the solution.
while configuring password i wrongly entered the alias name. it should be

bin/elasticsearch-keystore add xpack.notification.email.account.gmail_account.smtp.secure_password

instead of
bin/elasticsearch-keystore add xpack.notification.email.account.gmail.smtp.secure_password

1 Like

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