Search code examples
phpemailpermissionsuser-controlsmediawiki

Allow anonymous users to send email to a certain user in MediaWiki


I have an all-core MediaWiki 1.33.0 website (no added extensions or skins).

Normally in MediaWiki, a registered user can send email to another registered user through the latter's user profile (and if the latter permitted getting emails from other registered users).

My problem is that anonymous users cannot send emails to a registered users as described.

I desire to allow anonymous users to send emails to registered users through their profile just a registered user would, so that the option "Send an email to that user" in sidebar, will appear for an anonymous user visiting a relevant user's profile.

Potential solution

There are PHP extensions for MediaWiki that allow a contact form available for all users, like ContactPage but I desire an extensionless solution if there is one (I prefer this to reduce complexity).

My question

As a non PHP developer I ask; is there a PHP hook (or tweak?) usable in LocalSettings.php to allow anonymous users to send me email through that profile?
If not, is there a Wiki syntax API call or an AJAJ call to bypass the PHP restriction?

Original discussion in MediaWiki community


Solution

  • As long as it is only you, it might be possible to allow anonymous users to send emails to any user by granting them the sendemail user right via LocalSettings.php

    I don't know if that's a great idea though, and mind I have not tested it.