global $wgOut, $wgUser, $wgLang, $wgRequest;
if( $wgRequest->wasPosted() && $wgUser->matchEditToken( $wgRequest->getText( 'token' ) ) ) {
$ok = $wgUser->sendConfirmationMail();
- $message = WikiError::isError( $ok ) ? 'confirmemail_sendfailed' : 'confirmemail_sent';
- $wgOut->addWikiText( wfMsg( $message ) );
+ if ( WikiError::isError( $ok ) ) {
+ $wgOut->addWikiText( wfMsg( 'confirmemail_sendfailed', $ok->toString() ) );
+ } else {
+ $wgOut->addWikiText( wfMsg( 'confirmemail_sent' ) );
+ }
} else {
if( $wgUser->isEmailConfirmed() ) {
$time = $wgLang->timeAndDate( $wgUser->mEmailAuthenticated, true );
link in your browser to confirm that your e-mail address is valid.",
'confirmemail_send' => 'Mail a confirmation code',
'confirmemail_sent' => 'Confirmation e-mail sent.',
-'confirmemail_sendfailed' => 'Could not send confirmation mail. Check address for invalid characters.',
+'confirmemail_sendfailed' => 'Could not send confirmation mail. Check address for invalid characters.
+
+Mailer returned: $1
+',
'confirmemail_invalid' => 'Invalid confirmation code. The code may have expired.',
'confirmemail_needlogin' => 'You need to $1 to confirm your email address.',
'confirmemail_success' => 'Your e-mail address has been confirmed. You may now log in and enjoy the wiki.',