# Email alert don't working

**URL:** <https://discourse.crowdsec.net/t/email-alert-dont-working/867>\
**Category:** crowdsec\
**Created:** [June 22, 2022, 8:01am UTC](https://discourse.crowdsec.net/t/email-alert-dont-working/867 "2022-06-22T08:01:26Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![elmor](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@elmor](https://discourse.crowdsec.net/u/elmor)\
**Post date:** [June 22, 2022, 8:01am UTC](https://discourse.crowdsec.net/t/email-alert-dont-working/867/1 "2022-06-22T08:01:26Z")

</div>

Hello, i have a problem with configuration on /etc/crowdsec/notifications/email.yaml. file  
I don’t know if the problem is on the informations i put there.

---

<div class="post-metadata">

**Author:** ![elmor](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@elmor](https://discourse.crowdsec.net/u/elmor)\
**Post date:** [June 22, 2022, 8:08am UTC](https://discourse.crowdsec.net/t/email-alert-dont-working/867/2 "2022-06-22T08:08:32Z")

</div>

i created gmail account for my smtp server to use it to send me mails alerts. and i use those credentials as smtp username, smtp password and email sender

---

<div class="post-metadata">

**Author:** ![thibault](https://dub1.discourse-cdn.com/flex013/user_avatar/discourse.crowdsec.net/thibault/32/2_2.png) [@thibault](https://discourse.crowdsec.net/u/thibault)\
**Post date:** [June 22, 2022, 8:21am UTC](https://discourse.crowdsec.net/t/email-alert-dont-working/867/3 "2022-06-22T08:21:59Z")

</div>

Hello,

Can you share the `crowdsec.log` file when it tries to send notifications ? It will make it easier to help 🙂

---

<div class="post-metadata">

**Author:** ![elmor](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@elmor](https://discourse.crowdsec.net/u/elmor)\
**Post date:** [June 22, 2022, 8:36am UTC](https://discourse.crowdsec.net/t/email-alert-dont-working/867/4 "2022-06-22T08:36:09Z")

</div>

![Capture d’écran (308)](https://europe1.discourse-cdn.com/flex013/uploads/crowdsec/original/1X/8ca5dd9dd3ab5ab62b7faf0e6ea17063f29a9e8e.png)

here is the logs… I don’t know where is the problem. Maybe in my configuration’s file

---

<div class="post-metadata">

**Author:** ![thibault](https://dub1.discourse-cdn.com/flex013/user_avatar/discourse.crowdsec.net/thibault/32/2_2.png) [@thibault](https://discourse.crowdsec.net/u/thibault)\
**Post date:** [June 22, 2022, 9:21am UTC](https://discourse.crowdsec.net/t/email-alert-dont-working/867/5 "2022-06-22T09:21:44Z")

</div>

A few questions :

- I don’t see email plugin errors : Can you share your config (plugin config and profile.yaml) to be sure it’s enabled ?
- You have a timeout when reaching CAPI : isn’t your machine filtered when reaching internet ?

---

<div class="post-metadata">

**Author:** ![elmor](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@elmor](https://discourse.crowdsec.net/u/elmor)\
**Post date:** [June 22, 2022, 9:39am UTC](https://discourse.crowdsec.net/t/email-alert-dont-working/867/6 "2022-06-22T09:39:43Z")

</div>

![Capture d’écran (312)](https://europe1.discourse-cdn.com/flex013/uploads/crowdsec/original/1X/58917a71bcec38a98defee9a6de5df48751e9a1b.png)

here is the email configuration’s file, i explained on the screenshot what informations i put.

---

<div class="post-metadata">

**Author:** ![elmor](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@elmor](https://discourse.crowdsec.net/u/elmor)\
**Post date:** [June 22, 2022, 9:40am UTC](https://discourse.crowdsec.net/t/email-alert-dont-working/867/7 "2022-06-22T09:40:41Z")

</div>

![Capture d’écran (313)](https://europe1.discourse-cdn.com/flex013/uploads/crowdsec/original/1X/fd445c3e068d8002503f22d0493910cfc1b2ada0.png)

here is the profile configuration’s file, i enabled email.

---

<div class="post-metadata">

**Author:** ![thibault](https://dub1.discourse-cdn.com/flex013/user_avatar/discourse.crowdsec.net/thibault/32/2_2.png) [@thibault](https://discourse.crowdsec.net/u/thibault)\
**Post date:** [June 27, 2022, 7:26am UTC](https://discourse.crowdsec.net/t/email-alert-dont-working/867/8 "2022-06-27T07:26:01Z")

</div>

Hello,

I see in your profile that you do have a profile before the one with notifications that has `on_success` set to `break` : [Format | CrowdSec](https://doc.crowdsec.net/docs/next/profiles/format/#on_success)

So if your alert matches the previous profile, this one won’t be evaluated 🙂

---

<div class="post-metadata">

**Author:** ![elmor](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@elmor](https://discourse.crowdsec.net/u/elmor)\
**Post date:** [June 27, 2022, 8:34am UTC](https://discourse.crowdsec.net/t/email-alert-dont-working/867/9 "2022-06-27T08:34:18Z")

</div>

hi, i already changed this and no update. unfortunately It didn’t work.

---

<div class="post-metadata">

**Author:** ![thibault](https://dub1.discourse-cdn.com/flex013/user_avatar/discourse.crowdsec.net/thibault/32/2_2.png) [@thibault](https://discourse.crowdsec.net/u/thibault)\
**Post date:** [June 27, 2022, 8:52am UTC](https://discourse.crowdsec.net/t/email-alert-dont-working/867/10 "2022-06-27T08:52:27Z")

</div>

Did you reload your service after your chance ?  
Also can you share the full profiles.yaml file with some of crowdsec.log when a decision gets triggered ?

In your previous logs, the notification didn’t even get triggered so it sounds like it might be a `profiles.yaml` issue

---

<div class="post-metadata">

**Author:** ![elmor](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@elmor](https://discourse.crowdsec.net/u/elmor)\
**Post date:** [June 27, 2022, 9:05am UTC](https://discourse.crowdsec.net/t/email-alert-dont-working/867/11 "2022-06-27T09:05:15Z")

</div>

![Capture d’écran (380)](https://europe1.discourse-cdn.com/flex013/uploads/crowdsec/original/1X/77d87146628a51377e63bfa43a453eccb3134e0a.png)

i see one error up there.

---

<div class="post-metadata">

**Author:** ![thibault](https://dub1.discourse-cdn.com/flex013/user_avatar/discourse.crowdsec.net/thibault/32/2_2.png) [@thibault](https://discourse.crowdsec.net/u/thibault)\
**Post date:** [June 27, 2022, 9:28am UTC](https://discourse.crowdsec.net/t/email-alert-dont-working/867/12 "2022-06-27T09:28:15Z")

</div>

The error says that the login / password isn’t valid (it’s gmail rejecting it)

---

<div class="post-metadata">

**Author:** ![elmor](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@elmor](https://discourse.crowdsec.net/u/elmor)\
**Post date:** [June 27, 2022, 9:30am UTC](https://discourse.crowdsec.net/t/email-alert-dont-working/867/13 "2022-06-27T09:30:59Z")

</div>

okay i got it but do you have any proposal for me?

---

<div class="post-metadata">

**Author:** ![thibault](https://dub1.discourse-cdn.com/flex013/user_avatar/discourse.crowdsec.net/thibault/32/2_2.png) [@thibault](https://discourse.crowdsec.net/u/thibault)\
**Post date:** [June 27, 2022, 10:04am UTC](https://discourse.crowdsec.net/t/email-alert-dont-working/867/14 "2022-06-27T10:04:37Z")

</div>

check your login and password, there might be a typo 🙂 but the error is outside of crowdsec’s scope it seems
