PHPMailer problem with i18n [solved]

Solutions for other advanced phplisters

PHPMailer problem with i18n [solved]

Postby theintoy » 9:23am, Sat 27 Oct, 2007

Hi,

I am attempting to get PHPLists working on my dev machine (PHPList 2.10.5, XP-SP2, Apache 2.2.6, PHP 5.2.4, MySQL 5.0.45).

I am trying to send an confirmation SMTP email and it is failing. I know the reason why it is failing is because my host is denying, that is not the issue, the issue is that PHPMailer is having a problem loading the I18n language files:

Code: Select all
./phpmailer/class.phpmailer.php [467]
....

$smtp_from = ($this->Sender == "") ? $this->From : $this->Sender;
        if(!$this->smtp->Mail($smtp_from))
        {
            $error = $this->Lang("from_failed") . $smtp_from;
            $this->SetError($error);
            $this->smtp->Reset();
            return false;
        }


The lookup of from_failed is failing with the error "language string failed to load".

I have looked around and found the following mantis:
http://mantis.phplist.com/view.php?id=5385 but this shows as resolved in 2.10.2 against 4756.

Some of the advice seems to be to add a / to pageroot in config, but this does not work for me.

Also the fix for 4756, to add parent::SetLanguage('en','phpmailer/language/'); to line 24 of /admin/class.phplistmailer.php already exists.

The fix for 4756 therefore does not appear to work in my case. I note others are having problems too, i.e. Mantis 0006331

I have checked the language files and phpmailer.lang-en.php contains:

Code: Select all
$PHPMAILER_LANG["from_failed"] = 'The following From address failed: ';


Any ideas?[/code]
theintoy
phpList newbie
 
Posts: 2
Joined: 6:56pm, Fri 26 Oct, 2007

Postby theintoy » 9:52am, Sat 27 Oct, 2007

I have a solution. I have posted this as a request for feedback against 4756 also.

Having looked through the code and following other fixes I have changed line 24 of /admin/class.phplistmailer.php to:

Code: Select all
 parent::SetLanguage('en',dirname(__FILE__) . '/phpmailer/language/');


This appears to have resolved the i18n issue for me.

Hope this helps others.
theintoy
phpList newbie
 
Posts: 2
Joined: 6:56pm, Fri 26 Oct, 2007


Return to Advanced Answers, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 1 guest

cron