**Background**
As a target of harassment, I want to restrict which user groups can send me email (e.g. choose between all users, require autoconfirmed access or admins). If sending email is disallowed this way, the "email this user" link should not be displayed and visiting Special:EmailUser/Foobar should display the "This user has chosen not to receive email from other users." message.
----
**Discussions**
* [[ https://meta.wikimedia.org/wiki/Grants:IdeaLab/Allow_users_to_restrict_who_can_send_them_email | IdeaLab ]]
* [[ https://meta.wikimedia.org/wiki/2016_Community_Wishlist_Survey/Categories/Miscellaneous#CW2016-R093 | 2016 Wishlist ]]
----
**Acceptance criteria**
// Note: this is all a Work-In-Progress! Please provide feedback in the comments below. //
* In the 'Email options' of the 'User profile' tab of Special:Preferences, replace the "Enable email from other users" tickbox with a dropdown
* Label: Allow direct emails from:
* The options in the dropdown should be:
| **Label** | **Allows email from** | **Map from existing preferences**
| Nobody | no users — should behave as when current tickbox is unticked | Unticked
| All users | all users with verified email addresses — should behave as when the current tickbox is ticked | Ticked
| Autoconfirmed users | all users with verified email addresses and in the autoconfirmed usergroup | n/a
| Administrators | all users with verified email addresses and in the administrators usergroup | n/a
* The default for new accounts created when their email address is created should be 'Autoconfirmed users'
* All existing user preferences should be mapped to the corresponding new preference
* The list of groups should be customizable per wiki by users with the editinterface permission
* The default for new accounts should be customizable per wiki by users with the editinterface permission
----
**Wireframe**
{F9384420}