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

**URL:** <https://discuss.elastic.co/t/missing-required-email-account-setting-for-account-gmail-smtp-host-must-be-configured/270512>\
**Category:** Kibana\
**Tags:** elastic-stack-alerting\
**Created:** [April 18, 2021, 9:01pm UTC](https://discuss.elastic.co/t/missing-required-email-account-setting-for-account-gmail-smtp-host-must-be-configured/270512 "2021-04-18T21:01:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dhyanesh\_Naik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dhyanesh_naik/32/77633_2.png) [@Dhyanesh\_Naik](https://discuss.elastic.co/u/Dhyanesh_Naik)\
**Post date:** [April 18, 2021, 9:01pm UTC](https://discuss.elastic.co/t/missing-required-email-account-setting-for-account-gmail-smtp-host-must-be-configured/270512/1 "2021-04-18T21:01:31Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [April 18, 2021, 9:17pm UTC](https://discuss.elastic.co/t/missing-required-email-account-setting-for-account-gmail-smtp-host-must-be-configured/270512/2 "2021-04-18T21:17:49Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Dhyanesh\_Naik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dhyanesh_naik/32/77633_2.png) [@Dhyanesh\_Naik](https://discuss.elastic.co/u/Dhyanesh_Naik)\
**Post date:** [April 18, 2021, 9:22pm UTC](https://discuss.elastic.co/t/missing-required-email-account-setting-for-account-gmail-smtp-host-must-be-configured/270512/3 "2021-04-18T21:22:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 16, 2021, 9:22pm UTC](https://discuss.elastic.co/t/missing-required-email-account-setting-for-account-gmail-smtp-host-must-be-configured/270512/4 "2021-05-16T21:22:49Z")

</div>

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