# Email sending error in elastalert. SMTPSenderRefused: (530, '5.5.1 Authentication Required)

**URL:** <https://discuss.elastic.co/t/email-sending-error-in-elastalert-smtpsenderrefused-530-5-5-1-authentication-required/109034>\
**Category:** Elasticsearch\
**Created:** [November 24, 2017, 1:17pm UTC](https://discuss.elastic.co/t/email-sending-error-in-elastalert-smtpsenderrefused-530-5-5-1-authentication-required/109034 "2017-11-24T13:17:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![varun1992](https://avatars.discourse-cdn.com/v4/letter/v/3da27b/32.png) [@varun1992](https://discuss.elastic.co/u/varun1992)\
**Post date:** [November 24, 2017, 1:17pm UTC](https://discuss.elastic.co/t/email-sending-error-in-elastalert-smtpsenderrefused-530-5-5-1-authentication-required/109034/1 "2017-11-24T13:17:04Z")

</div>

_i got gmail authentication error. my config and error message as below I already allowed less secure apps in gmail_

**Config.yaml file email section as below**

name: frequency\_rule  
type: frequency  
index: security  
num\_events: 50

timeframe:  
days: 1

filter:

- term:  
host.keyword : "azure-2"  
alert:
- email  
email:  
"to\_address@gmail.com"

smtp\_host: "[smtp.gmail.com](http://smtp.gmail.com)"  
smtp\_port: "465"  
smtp\_ssl: true  
from\_addr: "from\_address@gmail.com"  
user: "from\_address@gmail.com"  
password: "password"

**Error message as below**

PS C:\Users\smiforce-2ndPC\Downloads\Compressed\elastalert-master\elastalert-master\> python -m elastalert.elastalert --verbose --config ./config.yaml --rule ./alert\_rules/frequency4.yaml  
INFO:elastalert:Starting up  
INFO:elastalert:Queried rule frequency\_rule4 from 2017-11-20 09:48 Central Standard Time to 2017-11-21 09:48 Central Standard Time: 24 / 24 hits  
ERROR:root:Traceback (most recent call last):  
File "C:\Users\smiforce-2ndPC\Downloads\Compressed\elastalert-master\elastalert-master\elastalert\[elastalert.py](http://elastalert.py)", line 1246, in alert  
return self.send\_alert(matches, rule, alert\_time=alert\_time, retried=retried)  
File "C:\Users\smiforce-2ndPC\Downloads\Compressed\elastalert-master\elastalert-master\elastalert\[elastalert.py](http://elastalert.py)", line 1326, in send\_alert  
alert.alert(matches)  
File "elastalert\[alerts.py](http://alerts.py)", line 451, in alert  
self.smtp.sendmail(self.from\_addr, to\_addr, email\_msg.as\_string())  
File "C:\Python27\lib\[smtplib.py](http://smtplib.py)", line 737, in sendmail  
raise SMTPSenderRefused(code, resp, from\_addr)  
SMTPSenderRefused: (530, '5.5.1 Authentication Required. Learn more at\n5.5.1 [https://support.google.com/mail/?p=WantAuthError](https://support.google.com/mail/?p=WantAuthError) l4sm636961ioc.69 - gsmtp', 'from\_address@gmail.com')

ERROR:root:Uncaught exception running rule frequency\_rule4: (530, '5.5.1 Authentication Required. Learn more at\n5.5.1 [https://support.google.com/mail/?p=WantAuthError](https://support.google.com/mail/?p=WantAuthError) l4sm636961ioc.69 - gsmt

---

<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:** [December 22, 2017, 1:17pm UTC](https://discuss.elastic.co/t/email-sending-error-in-elastalert-smtpsenderrefused-530-5-5-1-authentication-required/109034/2 "2017-12-22T13:17:04Z")

</div>

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