# Email notification on\_success not working

**URL:** <https://travis-ci.community/t/email-notification-on-success-not-working/1580>\
**Category:** Travis CI Discussions & Feedback\
**Created:** [December 26, 2018, 12:51pm UTC](https://travis-ci.community/t/email-notification-on-success-not-working/1580 "2018-12-26T12:51:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nish-mdn](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@nish-mdn](https://travis-ci.community/u/nish-mdn)\
**Post date:** [December 26, 2018, 12:51pm UTC](https://travis-ci.community/t/email-notification-on-success-not-working/1580/1 "2018-12-26T12:51:03Z")

</div>

I am newbie to travis ci, my expectation for email notification each and every success and failure of the build i should receive email notification. But currently on success i am not getting email notification, only failure i am getting. Below are my settings of the travis yml for your reference.

```
  notifications:
    email:
      recipients:
        - xyz@abc.com
      on_success: always
      on_failure: always
    on:
      all_branches: true
      condition: $TRAVIS_BRANCH =~ ^developer*    

```

What i made mistake here, now on sucess works like :change only. Please help me here

---

<div class="post-metadata">

**Author:** ![iriberri](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/iriberri/32/479_2.png) [@iriberri](https://travis-ci.community/u/iriberri)\
**Post date:** [December 27, 2018, 10:19am UTC](https://travis-ci.community/t/email-notification-on-success-not-working/1580/2 "2018-12-27T10:19:21Z")

</div>

Hi there!

I’m afraid that at the moment Travis CI doesn’t support conditionals for notifications such as the following:

```
on:
  all_branches: true
  condition: $TRAVIS_BRANCH =~ ^developer*  

```

I think it’s possible that, since these conditions aren’t supported, Travis CI is not able to detect your configuration correctly and it is applying the default notification settings instead.

Do you see the same behavior (notifications on failure and on change) if you use only the following configuration without the branch conditionals?

```auto
  notifications:
    email:
      recipients:
        - xyz@abc.com
      on_success: always
      on_failure: always

```

If you have a link to a build where this happens, this would also be helpful so that we can check how it was configured internally.

Thank you!

---

<div class="post-metadata">

**Author:** ![nish-mdn](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@nish-mdn](https://travis-ci.community/u/nish-mdn)\
**Post date:** [December 27, 2018, 10:41am UTC](https://travis-ci.community/t/email-notification-on-success-not-working/1580/3 "2018-12-27T10:41:52Z")

</div>

@iriberri I will try without mentioning the branch name and get back to you with the build result. Thanks for your suggestions.

---

<div class="post-metadata">

**Author:** ![nish-mdn](https://avatars.discourse-cdn.com/v4/letter/n/7cd45c/32.png) [@nish-mdn](https://travis-ci.community/u/nish-mdn)\
**Post date:** [December 31, 2018, 9:36am UTC](https://travis-ci.community/t/email-notification-on-success-not-working/1580/4 "2018-12-31T09:36:06Z")

</div>

@iriberri. Below is my travis config file for your reference. Can you please guide why i m not getting each and every success build email notification?

#sudo: true  
language: ruby

# the following line is needed to enable the TravisCI build conditions

rvm: “2.3.1”  
#cache: bundler  
conditions: v0  
stages:

- name: staging
- name: production  
jobs:  
include:
  - stage: staging  
env:

  - stage: production  
if: branch = master  
script:
