Extension talk:STSGMassMailer

From MediaWiki.org
Jump to: navigation, search
The following discussion has been transferred from Meta-Wiki.
Any user names refer to users of that site, who are not necessarily users of MediaWiki.org (even if they share the same username).

I tried using this with 1.9 and got the following error msg...


Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\wamp\www\mediawiki-1.9.0rc1\includes\SpecialMassMailer.php on line 62

Contents

[edit] Same Error in 1.8.3

I am receiving the same error in 1.8.3. Everything else is working except for that error across the top of the page, and the fact that the e-mail list to the right is empty (I am sure that is related to the error of course).


[edit] Just blank Forms

I have installed that extension in 1.9.0 and 1.8.3 There is always just a blank form with nothing to select. Do I have to introduce a special User Group to get it running?

[edit] MySQL Error fixed

Hey All,


Sorry for the SQL errors, there was a problem with the table prefix which is assigned during installation. I've added accomidations for this now and I think it will work out of the box for most people now, I'll put the code up shortly, it is version 0.2.0.

Hope this helps. Martin


p.s. If you just want to update your code and not copy and paste the whole thing, then just add the '$wgDBprefix" var to the global command at the top of the wfSpecialMassMailer() function in the SpecialMassMailer.php. Then modify line '49' to read 'SELECT `user_real_name`, `user_email` FROM `".$wgDBprefix."user`

[edit] After the fix, I still had two more problems to solve before getting it to run.

--TDeeming 07:14, 16 August 2007 (UTC) I had tried to use this option earlier, but I did not get past the MYSQL problems, similar to those reported above.
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in 
C:\Programme\xampp\htdocs\wiki\includes\SpecialMassMailer.php on line 62
After the author "Martin Dale Lyness", uploaded a new version... the db error message disappeared, I could select users... and go through the process of sending a mass mail, but...
I kept getting an error message that the message could not be delivered. 
I am using MW 1.93 with XAMPP installed on a XP Professional. The email notification and user email is driven by PEAR's Mail using the...
$wgSMTP = array(
 'host'     => "localhost",
 'IDHost'   => "domain for MessageID",
 'port'     => 25,
 'auth'     => false,
 'username' => "my_user_name",
 'password' => "my_password"
);
However the STSGMassMailer did not seem to work with this configuration. So I began to experiment...
... and after turning on the Mecury Mail Server with a SMTP Pass-trough (relay) client... which is not required with the $wgSMTP array above... the error message itself disappeared and I received a page saying that the mail had been successfully sent....
BTW : The author later confirmed that "the extension will only work if the local machine has mail setup."
... but...
No mails were being recieved... 
... and when I took a look that the Mercury Server, I found that the SMTP Client was registering Syntax errors in the "MAIL FROM" and "RCPT TO" Fields.
"501 Syntax error, parameters in command "MAIL FROM:<Tim Deeming <tdeeming@r""
  • The Mercury Core itself wasn't recognizing any errors, but the SMTP Client was registering the 501 Syntax error, when it apparently tried to pass to our inhouse smtp server.
I looked at the code and started to experiment with the line 111 where the $from string is put together.
  • The original $from variable would result in something like... MAIL FROM:<John Doe <JDoe@email.com>>
  • After removing the RealName from the string, as shown below, I could successfully send MassMails.
/**            $from = $wgUser->getRealName()." <".$wgUser->getEmail().">";  Original**/
              $from = $wgUser->getEmail();   /** Changed to get rid of Real Name*/

I am not sure where the actual problem lies... maybe it is some incompatibility with our SMTP Server... which is actually a Lotus Notes Server... or maybe it is something with the Mercury SMTP Relay Client...
Anyway, the modification (work-around) helped me to get this very useful extension working... and I hope it helps anyone that faces the same problem.

Hi TDeeming

I read that you are using Mediawiki 1.9.3 with XAMPP on Windoxs XP. Me using the same config too.

Please help me out on one thing! Did you manage to get LDAP working? As in some AD Authentication ? Please Help Me on this kind soul.

--Ankit.madan 06:07, 23 August 2007 (UTC)

Ankit Madan ankit.madan@gmail.com

Hi Ankit,
Sorry, but we are not using LDAP in our office... so I can't really be of much help here.--TDeeming 06:09, 30 August 2007 (UTC)

[edit] mail sent successfully but no mail received...

hi, i use mw 1.11. and i installed this extension. i have access as sysop to the specialpage and can send mails. at least the special page tells me so.the mailadresses of the users are correct and i receive no error.
i filled the $wgSMTP array with the required fields and the server ip, user and pw should be correct.
are there any other configurations i should now about? --212.184.19.70 09:26, 22 February 2008 (UTC)

You may want to take a look at the error log for the web server to see if there is a hint there why this isn't working. If that fails, you could also turn on debugging output in the MediaWiki code and anf go through its gobs of data. --Gri6507 12:59, 22 February 2008 (UTC)
my error log just tells me about ssl stuff...How do i debug the mediawiki code?--212.184.19.70 14:25, 22 February 2008 (UTC)

[edit] Mass Mailer Working Well for Me - Thanks!

I hope this info encourages others to try Mass Mailer.

  • MediaWiki: 1.11.1
  • PHP: 5.2.3 (apache2handler)
  • MySQL: 5.0.51a
  • STSGMassMailer version: 0.3.5
  • Shared remote hosting server: Servage.net
  • URL DishiWiki, a recipe and food wiki and community

Just wanted to thank Martin and Paul for a very useful extension that worked right out of the box for me. STSGMassMailer is working beautifully, and I use it for e-mail blasts to alert users of new functionality, because DishiWiki is brand new, and things are happening fast.

I DID add ">?" at the end of both PHP files:

SpecialMassEmail.setup.php and

SpecialMassEmail.body.php

because when troubleshooting the very first extension I installed (RSS Reader) I was told that all PHP files need that character pair at the end of the file, followed by no white space. And adding that to one of the PHP files for the RSS Reader file fixed my error on RSS Reader.

If anybody wants to comment to this newbie about that issue in general (adding >? at the end of PHP files), I would be happy to hear your expertise and learn some more.

I also had Google News Bar v. 071007 and RSS Reader v. 0.2.3 installed before installing STSGMassMailer.

SMTP Mail was enabled on my remote shared server before I installed Mass Mailer.

- Brian7632416 15:43, 20 March 2008 (UTC)

[edit] Special Page Doesn't Appear

I've completed the instructions for v. 0.3, but although I have sysop and bureaucrat status, I'm seeing nothing on my list of Special Pages. Are the instructions for version .3 in addition to those for .2, or instead of? And if the latter, what else could I be doing wrong?

--StochasticJack 00:18, 12 May 2008 (UTC)

[edit] Why does this send to Blocked users?

I have quite a few users on my wiki that I've blocked because they are spammers. I keep them on the list so that they can't use the same account/IP number to spam again.

But when I use this extension, they all show up on the list of those that will get email. Obviously I don't want to send email to users I've blocked from using the wiki for spamming (their email addresses are likely just going to bounce anyway).

How can I exclude blocked users from those that will get email?    216.254.74.149 00:56, 16 September 2008 (UTC)

[edit] HTML Capability Would Be Fantastic

  • MediaWiki: 1.11.1
  • PHP: 5.2.3 (apache2handler)
  • MySQL: 5.0.51a
  • STSGMassMailer version: 0.3.5
  • Shared remote hosting server: Servage.net
  • URL DishiWiki.com

I would really like to see HTML ability implemented for this otherwise fast and robust extension that I use frequently. Including a mailto or URL get delivered as clickable links, but they're not pretty. I guess this is just my wish list for future versions. In the meantime, thanks, guys, for a solid and reliable extension. Brian7632416 02:09, 24 October 2008 (UTC)

[edit] user email preference settings

In my version I modified the line that creates the list of users so:

                    if ($u->isAllowed('read') && ($u->getEmail() != '') && ($u->canReceiveEmail()))

by adding the extra canReceiveEmail() then users can turn off "allow e-mail from other users" in their preferences to avoid receiving the mass emails. This is with wiki version 1.13.x, maybe earlier too. - Owlmonkey 23:25, 13 April 2009 (UTC)

[edit] What does v0.3.x and v0.2.0 mean?

Sachein 09:06, 13 May 2009 (UTC)

[edit] Won't work.

MediaWiki Version 1.15.1

Special:MassMailer says

"No such special page
You have requested an invalid special page.
A list of valid special pages can be found at Special pages.
Return to Main Page."

Please help.

[edit] Issues - not sure if they are known or not

1) Users must have a "real name" set

I found a (very) simple tweak to use the nickname instead, see extension main page --Varlin 22:45, 25 July 2011 (UTC)

2) Users must have a password set: Users whose have been created via email but have not logged in (and thus have a temporary password) cannot be emailed via this extension.

I'm not sure if these are API or extension limitations, but they are something to keep in mind for users and admins. Thanks for putting this together though - once all my users are valid, this will be extremely helpful! --Fungiblename 22:29, 15 March 2010 (UTC)

[edit] System Messages can't be edited after installing this extension

I have MediaWiki 1.15.3. If you try and change a System Message after installing this extension then you'll get this error message (I had to add "$wgShowExceptionDetails = true;" to LocalSettings.php so I could see the error message):

Detected bug in an extension! Hook MassEmail::loadMessages failed to return a value; should return true to continue hook processing or false to abort.

Backtrace:

  1. 0 /home/davelind/public_html/the-online-racing-association.com/w/includes/MessageCache.php(788): wfRunHooks()
  2. 1 /home/davelind/public_html/the-online-racing-association.com/w/includes/LogPage.php(168): MessageCache->loadAllMessages('LoadAllMessages')
  3. 2 /home/davelind/public_html/the-online-racing-association.com/w/includes/LogPage.php(342): LogPage::actionText()
  4. 3 /home/davelind/public_html/the-online-racing-association.com/w/includes/PatrolLog.php(27): LogPage->addEntry('patrol', 'patrol', Object(Title), NULL, Array)
  5. 4 /home/davelind/public_html/the-online-racing-association.com/w/includes/Article.php(1754): PatrolLog::record('patrol', Object(Title), , Array)
  6. 5 /home/davelind/public_html/the-online-racing-association.com/w/includes/Article.php(1444): Article->doEdit(Object(RecentChange), true)
  7. 6 /home/davelind/public_html/the-online-racing-association.com/w/includes/EditPage.php(886): Article->insertNewArticle('Real name:', , 97)
  8. 7 /home/davelind/public_html/the-online-racing-association.com/w/includes/EditPage.php(2483): EditPage->internalAttemptSave('Real name:', , false, false, false, false, false)
  9. 8 /home/davelind/public_html/the-online-racing-association.com/w/includes/EditPage.php(449): EditPage->attemptSave(false, false)
  10. 9 /home/davelind/public_html/the-online-racing-association.com/w/includes/EditPage.php(340): EditPage->edit()
  11. 10 /home/davelind/public_html/the-online-racing-association.com/w/extensions/FCKeditor/FCKeditor.body.php(218): EditPage->submit()
  12. 11 /home/davelind/public_html/the-online-racing-association.com/w/includes/Hooks.php(117): FCKeditor_MediaWiki->onCustomEditor()
  13. 12 /home/davelind/public_html/the-online-racing-association.com/w/includes/Wiki.php(502): wfRunHooks()
  14. 13 /home/davelind/public_html/the-online-racing-association.com/w/includes/Wiki.php(63): MediaWiki->performAction(Object(Article), Object(StubUser))
  15. 14 /home/davelind/public_html/the-online-racing-association.com/w/index.php(116): MediaWiki->initialize(Array, Array)
  16. 15 {main}

When I remove the "require_once( "$IP/extensions/SpecialMassEmail.setup.php" );" from LocalSettings.php I can change a System Message without problem but it's annoying that I have to do this every time I want to change a System Message.

If you have MW 1.16+, you can just comment out the line $wgHooks['LoadAllMessages'][] = 'MassEmail::loadMessages'; Max Semenik 18:01, 22 September 2010 (UTC) Wrong, it doesn't register its message file. Just replace if ( $messagesLoaded ) return; with if ( $messagesLoaded ) return true; which will also work for all recent versions. Max Semenik 18:44, 22 September 2010 (UTC)
Thanks, it works now! --Holygamer 21:17, 22 September 2010 (UTC)
This has been fixed in v0.3.7 --Gri6507 01:57, 23 September 2010 (UTC)
Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox