phplist

NOTE:: Before reporting an issue, make sure you are running the latest version, currently 3.3.1


View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004756phplist applicationMessage Send Processpublic17-11-05 09:1010-01-11 01:38
Reporterafx114 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version2.10.2 
Target Version2.10.7Fixed in Version2.10.7 
Summary0004756: PHPMailer doesn't properly include its language files.
DescriptionMany people are experiencing errors with the PHPMailer class but they are extremely difficult to track down because its language files aren't properly included. No proper error messages are printed from PHPMailer because of this.

A sample error is:
"Mailer Error: Language string failed to load: instantiate"

The reason is because while class.phplistmailer is instantiated in /admin, its parent class (class.phpmailer) is instantiated in /admin/phpmailer, so PHPMailer ends up looking for its language files in /admin/language, which of course does not exist.

This is a VERY trivial fix. Simply add the following to line 24 of /admin/class.phplistmailer.php:

parent::SetLanguage('en','phpmailer/language/');

By passing in that optional second parameter, we allow PHPMailer to finds its language files, which is ABOSULUTELY VITAL to tracking down and solving problems with sending mail.

I have made this change and tested it on my own 2.10.2 install and it works great. I can now see the errors PHPMailer is encountering. I don't have the time to get a CVS account, but can someone patch and test this and please check it in if it works for you! Thanks.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to 0003721closed phplist 2.10.x 
has duplicate 0002010closed PHPMailer modification to get around SMTP Mailer Error 
has duplicate 0005385resolvedmichiel Mailer Error: Language string failed to load: instantiate 
has duplicate 0006331resolvedmichiel Mailer Error: Could not instantiate mail function 

-  Notes
(0008799)
michiel (manager)
21-11-05 15:54

on the phpmailer mailinglist this issue came up and I thought I'd fixed it by hacking phpmailer to load the correct language files (using dirname(__FILE__) to reference the language files). Sounds like it didn't. Will update for next release
(0010516)
user1177
09-02-06 19:21

Here's a possible solution from the forums http://www.phplist.com/forums/viewtopic.php?p=14332#14332 [^]

IN CLASS.PHPLISTMAILER:PHP LINE #4 change this:

require( $GLOBALS"coderoot"] . "phpmailer/class.phpmailer.php");

FOR:

require( $GLOBALS["coderoot"] . "/phpmailer/class.phpmailer.php");
(0013090)
michiel (manager)
26-04-06 22:39

have fixed this is CVS, but I couldn't recreate the errors, so it's hard to check that it actually fixed the problem. I was able to send via authenticated SMTP though, so it didn't break anything, presumably.
(0035392)
theintoy (reporter)
27-10-07 10:48

I still had issues in 2.10.5. Having looked through the code and following other fixes I have changed line 24 to:
[code]
 parent::SetLanguage('en',dirname(__FILE__) . '/phpmailer/language/');
[/code]

This appears to have resolved the i18n issue for me
(0044334)
alfredo_tripicchio (reporter)
08-04-08 11:58

Hi everybody, here is what I found out:

Version 2.10.2
applied patch from http://mantis.tincan.co.uk/view.php?id=4756 [^]
to file lists/admin/class.phplistmailer.php, line 24
substituted
parent::PHPMailer();
with
parent::SetLanguage('en','phpmailer/language/');

Version 2.10.5
the patch has been included, but still does not work.
This is because now I have this in lists/config/config.php
define("PHPMAILER",1);
whereas I had
define("PHPMAILER",0);
in older installations, so I never really tested the patch before (duh!)

Version 2.10.5
I applied the patch from theintoy (thank you mate!)
substituted
parent::SetLanguage('en','phpmailer/language/');
with
parent::SetLanguage('en',dirname(__FILE__) . '/phpmailer/language/');

and IT WORKS!
(0044364)
user1308
08-04-08 15:40

Applied for v2.10.6


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker