| Email Users Extension |
|
|
|
| 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:
CONFIGURATION: There are a couple variables you can change if you'd like:
If you like it, or have any problems, please leave me a comment. Enjoy!! Set as favorite Bookmark
Email This
Hits: 833 Trackback(0)
Comments (4)
![]()
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 ( '''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 ( '''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
|
Flemming Bjerke
said:
![]() |
Well, I had to fix it 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 ( '''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 ( '''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
|
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
|
| Next > |
|---|






'''Ingen blanke'''",
