# Email Alerts not working

**URL:** https://community.graylog.org/t/email-alerts-not-working/19340
**Category:** Graylog Central (peer support)
**Created:** [April 1, 2021, 10:43am UTC](https://community.graylog.org/t/email-alerts-not-working/19340 "2021-04-01T10:43:03Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![him](https://avatars.discourse-cdn.com/v4/letter/h/82dd89/32.png) [@him](https://community.graylog.org/u/him)
#### Post date: [April 1, 2021, 10:43am UTC](https://community.graylog.org/t/email-alerts-not-working/19340/1 "2021-04-01T10:43:04Z")

</div>

I referred to this [link](https://community.graylog.org/t/how-to-send-email-alerts-using-gmail/4103)

and my configuration looks like this:

```
# Email transport
transport_email_enabled = true
transport_email_hostname = smtp.google.com
transport_email_port = 465
transport_email_use_auth = true
transport_email_use_tls = false
transport_email_use_ssl = true
transport_email_auth_username = email@mydomain.tld
transport_email_auth_password = 'Password'
transport_email_subject_prefix = [graylog]
#transport_email_from_email = graylog@mydomain.tld

```

SSL and TLS were not working together. So has to toggle one of them off (false).  
I tried with a Less secure app On also with APP Password, still same facing the same issue.  
I am not able to figure out the root of this issue if it is related to Gmail authentication or the gray server.  
Tried both SSL and TLS on their respective ports (Port for SSL: 465 Port for TLS/STARTTLS: 587) same issue.

I have been trying it for more than a week now, no luck.  
Any help would be appreciated.

Thank you.

---

<div class="post-metadata">

### Author: ![aaronsachs](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/aaronsachs/32/7180_2.png) [@aaronsachs](https://community.graylog.org/u/aaronsachs)
#### Post date: [April 1, 2021, 8:11pm UTC](https://community.graylog.org/t/email-alerts-not-working/19340/2 "2021-04-01T20:11:08Z")

</div>

Can you elaborate on what you mean by “not working?” Are you getting log messages that indicate the failures? Are you seeing something in the UI? Just the config doesn’t give us much to go off of.

---

<div class="post-metadata">

### Author: ![him](https://avatars.discourse-cdn.com/v4/letter/h/82dd89/32.png) [@him](https://community.graylog.org/u/him)
#### Post date: [April 5, 2021, 5:26am UTC](https://community.graylog.org/t/email-alerts-not-working/19340/3 "2021-04-05T05:26:47Z")

</div>

![Selection_011](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/2X/e/e39d93e2d46f25ff570d9af9a298b7df307342be.png)  
This is the error I am getting.  
**Error** :  
An error occurred while trying to send an email! The Graylog server encountered an error while trying to send an email. This is the detailed error message: org.apache.commons.mail.EmailException: Sending the email to the following server failed: [smtp.google.com:465](http://smtp.google.com:465) (com.sun.mail.util. MailConnectException: Couldn’t connect to host, port: [smtp.google.com](http://smtp.google.com), 465; timeout 60000; nested exception is: java.net.SocketTimeoutException: connect timed out)

---

<div class="post-metadata">

### Author: ![him](https://avatars.discourse-cdn.com/v4/letter/h/82dd89/32.png) [@him](https://community.graylog.org/u/him)
#### Post date: [April 5, 2021, 7:27am UTC](https://community.graylog.org/t/email-alerts-not-working/19340/4 "2021-04-05T07:27:48Z")

</div>

Finally able to resolve this issue has to use **[smtp.gmail.com](http://smtp.gmail.com)** instead of [smtp.google.com](http://smtp.google.com).  
Working like charm now.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)
#### Post date: [April 19, 2021, 7:28am UTC](https://community.graylog.org/t/email-alerts-not-working/19340/5 "2021-04-19T07:28:09Z")

</div>

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