# User can (attempt to) change mail address to non-whitelisted domain

**URL:** <https://meta.discourse.org/t/user-can-attempt-to-change-mail-address-to-non-whitelisted-domain/37952>\
**Category:** Bug\
**Created:** [2016年一月14日 15:48 UTC](https://meta.discourse.org/t/user-can-attempt-to-change-mail-address-to-non-whitelisted-domain/37952 "2016-01-14T15:48:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sander78](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sander78/32/296615_2.png) [@Sander78](https://meta.discourse.org/u/Sander78)\
**Post date:** [2016年一月14日 15:48 UTC](https://meta.discourse.org/t/user-can-attempt-to-change-mail-address-to-non-whitelisted-domain/37952/1 "2016-01-14T15:48:30Z")

</div>

Case:

- user changes mail address to a domain that is not whitelisted
- user gets mail to confirm that address
- clicking that link results in error _There was an error changing your email address. Perhaps the address is already in use?_

Apart from the fact that the error message doesn’t help at all, why was the address accepted in the first place?

Although the change is not accepted - hence the whitelisting works - it’s confusing for the user.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2016年一月14日 20:32 UTC](https://meta.discourse.org/t/user-can-attempt-to-change-mail-address-to-non-whitelisted-domain/37952/2 "2016-01-14T20:32:24Z")

</div>

Hmm yes we should improve this @techapj.

---

<div class="post-metadata">

**Author:** ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)\
**Post date:** [2016年一月16日 05:33 UTC](https://meta.discourse.org/t/user-can-attempt-to-change-mail-address-to-non-whitelisted-domain/37952/3 "2016-01-16T05:33:11Z")

</div>

Okay, fixed via

[https://github.com/discourse/discourse/commit/380764dc92dd5e97db6dec5430bae2f517373748](https://github.com/discourse/discourse/commit/380764dc92dd5e97db6dec5430bae2f517373748)

Thanks for reporting this issue @Sander78! 👍

---

<div class="post-metadata">

**Author:** ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)\
**Post date:** [2016年一月16日 05:33 UTC](https://meta.discourse.org/t/user-can-attempt-to-change-mail-address-to-non-whitelisted-domain/37952/4 "2016-01-16T05:33:14Z")

</div>


