Extension talk:New User Email Notification

Archived discussions can be found here

Add a Name to mail reciptients listed in $wgNewUserNotifEmailTargets
First of all i'd like to say "thanks" to all who work(ed) on this extension: it's really cool.

Today i set up a mailadress on my mailserver which distributes incoming mail to several other adresses. I put it into $wgNewUserNotifEmailTargets in my wiki so the new user notification is sent to it. Unfortunally The Email body says now "Hello forwarder@mywikisystem.net ...".

Maybe it is possible to use an associative array instead of the simple array, something like this:

$wgNewUserNotifEmailTargets = array ( "E-Mail forwarder member" -> "forwarder@mywikisystem.net", "anothermailforwarder member" -> "forwarder2@mywikisystem.net" )

This way, even for adresses in $wgNewUserNotifEmailTargets The mail body could contain a better title.

--Rootkid 08:49, 5 September 2008 (UTC)

Users not getting confirmation email
It seems like the servers for some of the users on my wiki aren't allowing through the confirmation email. Is there anything that can be done about this from the wiki side of things? --Pschloss 18:06, 24 July 2009 (UTC)

Doesn't work in conjunction with LDAP Authentication Plugin
 SOLVED

I have Extension:LDAP Authentication running, and this extension doesn't work. If I disable LDAP, the extension does work, so that's definitely the issue. Any ideas how to make the two cooperate together? Timneu22 13:51, 23 March 2010 (UTC)


 * The fix &mdash; possibly inelegant &mdash; is to add the wfRunHooks line in SpecialUserLogin.php.

Problem with getting IP
Here is my makeMessage function:

However, I get this error:

(I use One&One).

Any ideas? -- Phantom Steve /talk &#124;contribs \ 08:57, 18 June 2010 (UTC)

Re:Problem with getting IP --jdpond 11:38, 18 June 2010 (UTC)

 * You forgot to declare $wgContIP as global (see above corrected)
 * Thanks for that, Jpond, but I'm still getting the same error! Here is a copy from my current LocalSettings.php file (copy and pasted directly):


 * And here is what I have in my current NewUserNotif.class.php (copy and pasted directly):


 * I also tried changing the line to  but I still get the same error message, but with   instead of   in the error message -- Phantom Steve /talk &#124;contribs \ 12:45, 18 June 2010 (UTC)


 * Try the above. I should have looked at this before replying.  wfGetIP requires no object, there is no such thing as $wgContIP
 * Thanks, that got the IP working. I can't get the Email address to work, but I'll leave that for now. Thanks for all your help -- Phantom Steve /talk &#124;contribs \ 15:55, 18 June 2010 (UTC)
 * See above for email address - sorry should have fixed it the first time. --jdpond 17:48, 18 June 2010 (UTC)

Re:Problem with getting IP --jdpond 00:47, 19 June 2010 (UTC)

 * I just released 1.5.2 - I'd had it in the can for over a year, but didn't want to do the documentation. You can download from trunk.


 * If you upgrade to 1.5.2, all you have to do is add the following two lines in localsettings.php below the extension inclusion:

Customizing Notification Message and Adding Parameters (>= 1.5.2) - An Example
One of the inhibitors to the adoption of MediaWiki as an Enterprise tools is the ability to vet contributers prior to their posting of information. This is especially necessary where vandilism and inappropriate postings impact directly on the reputation and brand of the community.

To avoid this, many sites have gone to a mechanism where only approved or vetted users may post. The problem here is administrative, knowing who is requesting access (creating accounts), and responding to them in a timely fashion without undue burden on the administrator who vets the editors.

This modification was made so that when a new account is created, the administrator is automatically notified. In the notification, there is a link to the userrights of that user and another "mailto" link which, when clicked, automatically creates a response email using the registered address of the requestor.

In order to do this, additional parameters were required for the email messages.

Starting with version 1.5.2, you can add additional parameters to further customize the messages. The mechanism is actually through the creation of an extension to the extension.

To do this, you need to:
 * 1) Add additional parameters to pass to the message generator
 * 2) Modify the message text body
 * 3) Modify the message subject body

Add Parameters to Pass to Message Generator
This involves creating an extension to the extension. For this example, the extension file "ExtendedParamsExample.php" can be found in the extension distribution. It is recommended you create a copy of this file and rename it to something meaningful to your site(s).

You would then include this in your localsettings.php after you included the NewUserNotif.php for this extension.

In this example, an additional 4 parameters are added:

Modify MediaWiki:Newusernotifbody
Modify the message body to use these parameters by editing MediaWiki:Newusernotifbody:

Hello $1,

A new user account, $2, has been created on $3 at $4 for $2<$7> from IP address $9.

If this is a desired user, you should approve at: /$2.

Then notify mailto:$10<$7>&subject=Account%20Approved%20for%20$8%20Access&body=A%20new%20user%20account,%20$2,%20has%20been%20approved%20on%20$8%20at%20your%20request.%0A%0AYou%20now%20have%20approved%20rights%20at%20%20for%20this%20wiki.%0A%0AYour%20Friendly%20Sysop

Your Friendly Sysop!

Modify MediaWiki:Newusernotifsubj
Modify the message subject to use aditional parameters by editing MediaWiki:Newusernotifsubj:

[$1] New user notification User:$2

Does not work with 1.16
Hi,

tried but no email was sent to the admin. Also the additional targets did not receive any mail.

Re: Does not work with 1.16 --jdpond 19:23, 21 April 2011 (UTC)

 * I've had trouble with this working on several service providers, among them networksolutions, but it works fine on servers to which I have local (root). I can't seem to find a consistent pattern here.  Anyone have any ideas?