# Unable to send email with watcher

**URL:** <https://discuss.elastic.co/t/unable-to-send-email-with-watcher/290661>\
**Category:** Kibana\
**Tags:** elastic-stack-alerting\
**Created:** [December 1, 2021, 12:37pm UTC](https://discuss.elastic.co/t/unable-to-send-email-with-watcher/290661 "2021-12-01T12:37:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alejandro\_Chaves](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alejandro_chaves/32/97753_2.png) [@Alejandro\_Chaves](https://discuss.elastic.co/u/Alejandro_Chaves)\
**Post date:** [December 1, 2021, 12:37pm UTC](https://discuss.elastic.co/t/unable-to-send-email-with-watcher/290661/1 "2021-12-01T12:37:40Z")

</div>

{  
"id" : "send\_email",  
"type" : "email",  
"status" : "failure",  
"error" : {  
"root\_cause" : [  
{  
"type" : "messaging\_exception",  
"reason" : "failed to send email with subject [Watcher Notification] via account [gmail\_account]"  
}  
],  
"type" : "messaging\_exception",  
"reason" : "failed to send email with subject [Watcher Notification] via account [gmail\_account]",  
"caused\_by" : {  
"type" : "authentication\_failed\_exception",  
"reason" : "failed to connect, no password specified?"  
}  
}  
}

I have done the configuration in the yml for gmail  
#------------- WATCHER EMAIL ACCOUNT SETUP -------------------  
xpack.notification.email.account:  
gmail\_account:  
profile: gmail  
smtp:  
auth: true  
starttls.enable: true  
host: [smtp.gmail.com](http://smtp.gmail.com)  
port: 587  
user: [alejandrochaves1997@gmail.com](mailto:alejandrochaves1997@gmail.com)  
#--------------------------------------------------------------

And also store the account SMTP password with the keystore command

bin/Elasticsearch-keystore add xpack.notification.email.account.gmail\_account.smtp.secure\_password

Any idea what might be happening?

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [December 2, 2021, 8:53pm UTC](https://discuss.elastic.co/t/unable-to-send-email-with-watcher/290661/2 "2021-12-02T20:53:40Z")

</div>

did you use quotes for the setting in Elasticsearch-keystore? Also, I think it might need an ES restart to take that into account, not sure.

---

<div class="post-metadata">

**Author:** ![Alejandro\_Chaves](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alejandro_chaves/32/97753_2.png) [@Alejandro\_Chaves](https://discuss.elastic.co/u/Alejandro_Chaves)\
**Post date:** [December 9, 2021, 8:24am UTC](https://discuss.elastic.co/t/unable-to-send-email-with-watcher/290661/3 "2021-12-09T08:24:11Z")

</div>

i just use:  
bin/Elasticsearch-keystore add xpack.notification.email.account.gmail\_account.smtp.secure\_password

and then set the passwd, and i restart Elasticsearch too.  
where i need to put the quotes?  
can you write me an example of the command if im writing him wrong?

---

<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:** [January 6, 2022, 8:24am UTC](https://discuss.elastic.co/t/unable-to-send-email-with-watcher/290661/4 "2022-01-06T08:24:17Z")

</div>

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