On a wiki of mine, I require users to enter an address and to confirm it before being able to contribute.
Since the MediaWiki 1.25 upgrade (and upgrade from PHP 5.3.29 to 5.6.9), users are getting the following error on the page that is supposed to welcome them after the user signup form:
> Welcome, Test!
> Testwiki kon uw bevestigingscode niet verzenden. Controleer uw e-mailadres op ongeldige tekens.
> Het e-mailprogramma meldde: Er is een onbekende fout opgetreden in de mail()-functie van PHP
> Uw account is aangemaakt. Indien gewenst kunt u uw voorkeuren voor Testwiki aanpassen.
(An unknown error occurred in the php `mail()` functie)
The same happens when trying to use Special:ChangeEmail.
Debug log on Create account
```
[antispoof] PASS new account 'Test' [v2:TE5T]
MWCryptRand::realGenerate: Generating cryptographic random bytes for User::setToken/MWCryptRand::generateHex/MWCryptRand::realGenerateHex/MWCryptRand::generate/MWCryptRand::realGenerate
MWCryptRand::realGenerate: mcrypt_create_iv generated 16 bytes of randomness.
MWCryptRand::realGenerate: 0 bytes of randomness leftover in the buffer.
DatabaseBase::query: Writes done: INSERT IGNORE INTO `mw_user` (user_id,user_name,user_password,user_newpassword,user_newpass_time,user_email,user_email_authenticated,user_real_name,user_token,user_registration,user_editcount,user_touched) VALUES (NULL,'X')
User: loading options for user 4434 from database.
MWCryptRand::realGenerate: Generating cryptographic random bytes for User::setToken/MWCryptRand::generateHex/MWCryptRand::realGenerateHex/MWCryptRand::generate/MWCryptRand::realGenerate
MWCryptRand::realGenerate: mcrypt_create_iv generated 16 bytes of randomness.
MWCryptRand::realGenerate: 0 bytes of randomness leftover in the buffer.
MWCryptRand::realGenerate: Generating cryptographic random bytes for User::setInternalPassword/PasswordFactory::newFromPlaintext/Pbkdf2Password::crypt/MWCryptRand::generate/MWCryptRand::realGenerate
MWCryptRand::realGenerate: mcrypt_create_iv generated 16 bytes of randomness.
MWCryptRand::realGenerate: 0 bytes of randomness leftover in the buffer.
MWCryptRand::realGenerate: Generating cryptographic random bytes for User::setToken/MWCryptRand::generateHex/MWCryptRand::realGenerateHex/MWCryptRand::generate/MWCryptRand::realGenerate
MWCryptRand::realGenerate: mcrypt_create_iv generated 16 bytes of randomness.
MWCryptRand::realGenerate: 0 bytes of randomness leftover in the buffer.
MWCryptRand::realGenerate: Generating cryptographic random bytes for User::confirmationToken/MWCryptRand::generateHex/MWCryptRand::realGenerateHex/MWCryptRand::generate/MWCryptRand::realGenerate
MWCryptRand::realGenerate: mcrypt_create_iv generated 16 bytes of randomness.
MWCryptRand::realGenerate: 0 bytes of randomness leftover in the buffer.
[exception] [00f90cc3] /mw/index.php?title=Speciaal:Aanmelden&action=submitlogin&type=signup&returnto=Hoofdpagina MWException from line 3658 of mw/includes/User.php: CAS update failed on user_touched for user ID '4434'.
#0 mw/includes/User.php(4165): User->saveSettings()
#1 mw/includes/specials/SpecialUserlogin.php(409): User->sendConfirmationMail()
#2 mw/includes/specials/SpecialUserlogin.php(314): LoginForm->addNewAccount()
#3 mw/includes/specialpage/SpecialPage.php(384): LoginForm->execute(NULL)
#4 mw/includes/specialpage/SpecialPageFactory.php(582): SpecialPage->run(NULL)
#5 mw/includes/MediaWiki.php(267): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#6 mw/includes/MediaWiki.php(566): MediaWiki->performRequest()
#7 mw/includes/MediaWiki.php(414): MediaWiki->main()
#8 mw/index.php(41): MediaWiki->run()
#9 {main}
UserMailer::send: sending mail to Test <krinklemail@gmail.com>
Sending mail via internal mail() function
Unknown error sending mail
[exception] [f4ee0e42] /mw/index.php?title=Speciaal:Aanmelden&action=submitlogin&type=signup&returnto=Hoofdpagina MWException from line 3658 of mw/includes/User.php: CAS update failed on user_touched for user ID '4434'.
#0 mw/includes/specials/SpecialUserlogin.php(418): User->saveSettings()
#1 mw/includes/specials/SpecialUserlogin.php(314): LoginForm->addNewAccount()
#2 mw/includes/specialpage/SpecialPage.php(384): LoginForm->execute(NULL)
#3 mw/includes/specialpage/SpecialPageFactory.php(582): SpecialPage->run(NULL)
#4 mw/includes/MediaWiki.php(267): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#5 mw/includes/MediaWiki.php(566): MediaWiki->performRequest()
#6 mw/includes/MediaWiki.php(414): MediaWiki->main()
#7 mw/index.php(41): MediaWiki->run()
#8 {main}
[cookie] setcookie: "test_mw_UserID", "4434", "1451069295", "/", "", "", "1"
[cookie] setcookie: "test_mw_UserName", "Test", "1451069295", "/", "", "", "1"
[cookie] setcookie: "test_mw_Token", "", "1435430895", "/", "", "", "1"
User: cache miss for user 4434
User: loading options for user 4434 from database.
[MessageCache] MessageCache::load: Loading en... got from local cache
MWCryptRand::realGenerate: Generating cryptographic random bytes for User::getEditTokenAtTimestamp/MWCryptRand::generateHex/MWCryptRand::realGenerateHex/MWCryptRand::generate/MWCryptRand::realGenerate
MWCryptRand::realGenerate: mcrypt_create_iv generated 16 bytes of randomness.
MWCryptRand::realGenerate: 0 bytes of randomness leftover in the buffer.
OutputPage::sendCacheControl: private caching; **
```
Debug log on Change e-mail:
```
MWCryptRand::realGenerate: Generating cryptographic random bytes for User::confirmationToken/MWCryptRand::generateHex/MWCryptRand::realGenerateHex/MWCryptRand::generate/MWCryptRand::realGenerate
MWCryptRand::realGenerate: mcrypt_create_iv generated 16 bytes of randomness.
MWCryptRand::realGenerate: 0 bytes of randomness leftover in the buffer.
DatabaseBase::query: Writes done: UPDATE `mw_user` SET user_name = 'X'
UserMailer::send: sending mail to Test <krinklemail@gmail.com>
Sending mail via internal mail() function
Unknown error sending mail
```