Monday, 06 September 2010
  • Home
  • About
  • Photography
  • Downloads
  • Portfolio
  • Contact

Login

Lost Password? No account yet? Register

Site Stats

Visits today: 28
Visits yesterday: 122
Visits month: 616
Visits total: 105212
Pages this month: 3041
Pages total: 811014

Top 5 Visitors by Country

United States 49% (52430)
United Kingdom 14% (14985)
Unknown 7% (7003)
Australia 6% (6874)
Canada 6% (6432)

105212 visits from 138 countries

Who's Online

We have 7 guests online

Total Users

Total Registered 1547
Registered Today 0
Registered This Week 0
Registered This Month 9

Donate

PayPal

Enter Amount:

$

Home arrow Downloads arrow MediaWiki arrow Email Users Extension
Email Users Extension PDF Print E-mail
Written by Andy   
Tuesday, 19 February 2008

I looked everywhere for a solution (extension) to send an email to every user of my Wiki, but never could find one. The closest I could find was an extension to email a page from the Wiki to a user. So what I did was modify it to my liking. I now present you with an extension that will allow you to send a mass email to users or groups within your Wiki (you can also send to users outside of your Wiki). Please note: that this extension uses phpmailer and is currently configured to use sendmail. If you don't use sendmail or Linux/Unix you will have to reconfigure class.phpmailer.php (included). For more help on this, please visit their website. Also note that I wrote this extension for MW 1.11.0 but it should work for earlier versions (at least back to 1.8.0). Now, on to the extension.

TO INSTALL:

  1. Download the zip (below) and extract it to the extensions folder of your MediaWiki installation (the EmailUsers folder should be in your extensions folder).
  2. Add the following line near the end of your LocalSettings.php file:
    include ("$IP/extensions/EmailUsers/EmailUsers.php");
  3. Browse to your Special Pages and look under "Restricted Special Pages" (you must be a sysop to view this page, by default) for "Email Users".

CONFIGURATION:

 There are a couple variables you can change if you'd like:

  • Change
    $wgEmailUsersGroup = 'sysop';
    to another group to change who can send emails.
  • Change
    $wgEmailUsersAllowAllUsers = 'true';
    to prevent sending to all users of the Wiki (the "user" group).
TODO: (if you can help, email me)
  • Make the "To" field a "BCC" field (this isn't important for me right now, as my Wiki is private) to hide the names of recipients.
  • Cleanup remaining code from EmailArticle.php (original extension).
  • Log sends to a log.
  • Rewrite to use built-in mail class instead of phpmailer.
BUGS:
  • Shows each email address twice (don't worry, it only sends it once).

If you like it, or have any problems, please leave me a comment. Enjoy!!

Download EmailUsers.zip
Set as favorite
Bookmark
Email This
Hits: 833
Trackback(0)
trackbackTrackBack URI for this entry
Comments (4)add comment
feedSubscribe to this comment's feed
feedShow/Hide comments

air jordan said:

goodgoodgoodgood
 
report abuse
vote down
vote up
April 27, 2010 | url
Votes: +0

Flemming Bjerke said:

Cool extention. Thank you. But, you have coded the program so that your wiki is not English, it doesn't. Now, it was easy to change. I have English to default (if ... else). But, you have forgotten one thing: It is impossible to change "from group" in that way. Anyhow, here is my simple fix:

if ($wgLanguageCode == 'da') {
$wgMessageCache->addMessages(array(
'EmailUsers' => "Email til Medlemmerne",
'ea_heading' => "=== Send en mail til wikimedlemmerne. ===
Indtast oplysninger i felterne
nedenfor og vælg modtager.",
'ea_norecipients' => "Der blev ikke fundet nogle gyldige emailadresser",
'ea_listrecipients' => "=== Liste med $1 modtagere ===",
'ea_error' => "'''Fejl i afsendelsen:''' ''$2''",
'ea_sent' => "Din mail er blevet sendt til '''$2''' recipient(s).[[Special:Email
Users|Send en mail til]] or return to the [[Main_Page|Forside]].",
'ea_selectrecipients' => "Vælg modtagere",
'ea_compose' => "Skriv mail her",
'ea_selectlist' => "Skriv mailadresser på extra modtagere
"
. "*''adskil email adresserne med semicolon (smilies/wink.gif '''Ingen blanke'''",
'ea_show' => "Se modtagerne",
'ea_send' => "Send!",
'ea_subject' => "Skriv emnet for din mail (HTML er tilladt)",
'ea_header' => "Indholdet af din mail",
));
}
else {
$wgMessageCache->addMessages(array(
'EmailUsers' => "EmailUsers",
'ea_heading' => "=== Send an email to users of your Wiki. ===
Use the form below to send a
mass email to selected users or groups.",
'ea_norecipients' => "No valid email addresses found!",
'ea_listrecipients' => "=== List of $1 recipients ===",
'ea_error' => "'''Error sending email:''' ''$2''",
'ea_sent' => "Your email has successfully been sent to '''$2''' recipient(s).[[S
pecial:EmailUsers|Send another email]] or return to the [[Main_Page|Main Page]].",
'ea_selectrecipients' => "Select recipients",
'ea_compose' => "Compose content",
'ea_selectlist' => "Send to additional recipients
"
. "*''separate email addresses with a semicolon (smilies/wink.gif '''No Spaces'''",
'ea_show' => "Show recipients",
'ea_send' => "Send!",
'ea_subject' => "Enter a subject line for the email (HTML allowed)",
'ea_header' => "Body of your email",
));
}

 
report abuse
vote down
vote up
June 01, 2010
Votes: +0

Flemming Bjerke said:

Well, I had to fix it smilies/angry.gif smilies/grin.gif

Line 101 is changed to:

$wgOut->addHTML("".wfMsg('ea_fromgroup').":$groupsaddMessages(array(
'EmailUsers' => "Email til Medlemmerne",
'ea_heading' => "=== Send en mail til wikimedlemmerne. ===
Indtast oplysninger i felterne
nedenfor og vælg modtager.",
'ea_norecipients' => "Der blev ikke fundet nogle gyldige emailadresser",
'ea_listrecipients' => "=== Liste med $1 modtagere ===",
'ea_error' => "'''Fejl i afsendelsen:''' ''$2''",
'ea_sent' => "Din mail er blevet sendt til '''$2''' recipient(s).[[Special:Email
Users|Send en mail til]] or return to the [[Main_Page|Forside]].",
'ea_selectrecipients' => "Vælg modtagere",
'ea_compose' => "Skriv mail her",
'ea_selectlist' => "Skriv mailadresser på extra modtagere
"
. "*''adskil email adresserne med semicolon (smilies/wink.gif '''Ingen blanke'''",
'ea_show' => "Se modtagerne",
'ea_send' => "Send!",
'ea_subject' => "Skriv emnet for din mail (HTML er tilladt)",
'ea_header' => "Indholdet af din mail",
'ea_fromgroup' => "Fra gruppen",
));
}
else {
$wgMessageCache->addMessages(array(
'EmailUsers' => "EmailUsers",
'ea_heading' => "=== Send an email to users of your Wiki. ===
Use the form below to send a
mass email to selected users or groups.",
'ea_norecipients' => "No valid email addresses found!",
'ea_listrecipients' => "=== List of $1 recipients ===",
'ea_error' => "'''Error sending email:''' ''$2''",
'ea_sent' => "Your email has successfully been sent to '''$2''' recipient(s).[[S
pecial:EmailUsers|Send another email]] or return to the [[Main_Page|Main Page]].",
'ea_selectrecipients' => "Select recipients",
'ea_compose' => "Compose content",
'ea_selectlist' => "Send to additional recipients
"
. "*''separate email addresses with a semicolon (smilies/wink.gif '''No Spaces'''",
'ea_show' => "Show recipients",
'ea_send' => "Send!",
'ea_subject' => "Enter a subject line for the email (HTML allowed)",
'ea_header' => "Body of your email",
'ea_fromgroup' => "From group",
));
}

# Add the specialpage to the environment
SpecialPage::addPage(new SpecialEmailUsers());
}
?>


 
report abuse
vote down
vote up
June 01, 2010
Votes: +0

Huge said:

Hi Andy.

This is brilliant and I have been hanging out for something like this for a while ... THANKS! You should let the Mediawiki people know about it because last time I looked it was on their To-do list ...

However, for my project (see website) I need to use this as a BCC send to protect members' privacy ... any plans to fix this??

Please advise.

Cheers,
Huge
 
report abuse
vote down
vote up
June 20, 2010 | url
Votes: +0

Write comment
hide/showShow/Hide comment form
quote
bold
italicize
underline
strike
url
image
quote
quote
smile
wink
laugh
grin
angry
sad
shocked
cool
tongue
kiss
cry
smaller | bigger

security image
Write the displayed characters


busy
Last Updated ( Friday, 22 February 2008 )
 
  • 1
  • 2
  • 3
  • 4
  • 5
(1 vote)
Next >
[ Back ]
Content and design by Andy Cook.
Copyright © 2010 - cookandy.com
 
To maximize your viewing experience use:
Safari  Firefox