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
0011493phplist applicationConfigurationpublic18-09-07 14:4818-12-07 19:03
StatusresolvedResolutionnot fixable 
PlatformOSOS Version
Product Version2.10.4 
Target VersionFixed in Version 
Summary0011493: $phpmailer_smtpport being ignored
DescriptionI am not able to get PHPlist (2.10.5) to abide by the phpmailer_smtpport directive. It will use different PHPMAILERHOST variables fine and I can confirm that using tcpdump, but the phpmailer_smtpport directive seems to be simply ignored -- connections continue to go to 25.
Additional InformationMy config is below. System is CentOS5 64-bit. php-common-5.1.6-12.el5

# If you tend to send out html emails, it is recommended to do so.

# To use a SMTP please give your server hostname here, leave it blank to use the standard
# PHP mail() command.
$phpmailer_smtpport = '125';

what is also strange is that the smtpport variable only seems to be referenced in the config file and nowhere else:

[root@panel lists]# grep -rin smtpport *
config/config.php:623:$phpmailer_smtpport = '125';
[root@panel lists]# pwd
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to 0015170resolvedmichiel Upgrading PhpMailer Class 

-  Notes
nd_oliveira (reporter)
19-09-07 16:26

I believe that there is a "major" bug in de phpmailer class.

When, in class.phplistmailer.php, the application variables are instantiated, then "this->Helo" variable is loaded with de website (phplist) URL, that is configured in the site main page:

$this->Helo = getConfig("website")

By that, when the send() function load the Hello command, it is sent do the site URL (ex.: http://localhost/phplist [^]), WRONG!!!!

The correct instantiation line is:
       $this->Helo = getConfig("PHPMAILERHOST");

This solves the problem....
h2b2 (manager)
19-09-07 19:44

As a side note, Arawak's report originates from this forum thread: [^]

Another way to put his question would IMO be whether or not the *FAQs documention* is correct in stating that one can change the default SMTP port by adding the following line in config.php:
$phpmailer_smtpport = '125';
arawak (reporter)
21-09-07 05:39

Definitely adjust the FAQ so more people don't waste hours debugging like I did but, better yet, if the functionality was there once upon a time, why not reimplement it? It's much more logical to have a variable like that set in the config file rather than in the class itself. Just my $0.02... nawt a developer.
h2b2 (manager)
04-12-07 21:30

I believe I am -at least in part- to blame for the confusion. Based on a number of forum posts indicating that the phpmailer_smtpport could be set, I mistakenly concluded the phpmailer_smtpport was an existing configuration setting in config.php, and included this as a "solution" in the FAQs, without checking first. Sorry about that.

Still, being able to define a different SMTP port than the default port 25 is a recurring question on the forums. In that sense, this issue might be considered a *feature request*.

In the mean time, for those that need a different SMTP port and want to be able to use the $phpmailer_smtpport setting, this is the solution proposed by davidhw:
The solution is to add this line in class.phplistmailer.php

after (around line 32):
      if (isset($GLOBALS['phpmailer_smtpuser']) && $GLOBALS['phpmailer_smtpuser'] != '') {
        $this->SMTPAuth = true;
        $this->Username = $GLOBALS['phpmailer_smtpuser'];
        $this->Password = $GLOBALS['phpmailer_smtppassword'];

add this:
      $this->Port = $GLOBALS['phpmailer_smtpport'];

That way the port is set by proper class methods, rather than hard-coding the class definition.
Source: [^]

Note: I'll change the FAQ and include a link to this report.
18-12-07 19:03

Needs to be hacked in the phpmailer class. See below.

Referenced from [^]

Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker