# Notifications emails from environment variable

**URL:** <https://travis-ci.community/t/notifications-emails-from-environment-variable/3118>\
**Category:** Travis CI Discussions & Feedback\
**Tags:** notifications\
**Created:** [April 22, 2019, 7:24am UTC](https://travis-ci.community/t/notifications-emails-from-environment-variable/3118 "2019-04-22T07:24:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chingis](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@chingis](https://travis-ci.community/u/chingis)\
**Post date:** [April 22, 2019, 7:24am UTC](https://travis-ci.community/t/notifications-emails-from-environment-variable/3118/1 "2019-04-22T07:24:28Z")

</div>

Hi,

I want to add an email for notifications from an environment variable (I don’t want to keep it open in the codebase). I added the following lines but it’s not working:

```auto
  notifications:
    email:
      recipients:
      - $NOTIFICATIONS_EMAIL
      on_success: never
      on_failure: always

```

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [April 22, 2019, 3:03pm UTC](https://travis-ci.community/t/notifications-emails-from-environment-variable/3118/2 "2019-04-22T15:03:04Z")

</div>

This is not possible. The notifications are configured when the build requests are received, and the environment variables are defined only when the build is executed.

---

<div class="post-metadata">

**Author:** ![chingis](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@chingis](https://travis-ci.community/u/chingis)\
**Post date:** [April 23, 2019, 4:31am UTC](https://travis-ci.community/t/notifications-emails-from-environment-variable/3118/3 "2019-04-23T04:31:53Z")

</div>

Thank you for letting me know!
