View Issue Details

IDProjectCategoryView StatusLast Update
0015325phplist applicationMessage Send Processpublic20-04-10 03:09
Reporterh2b2 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version2.10.10 
Target Version2.10.12Fixed in Version2.10.12 
Summary0015325: SMTP code is partially broken (revisited)
Descriptioncipixul reports that the code changes applied to "admin/class.phplistmailer.php" in order to fix issue 8590 can result in trouble:

===== Start Quote =====

The code is wrong because it uses PHPMAILERHOST only if the admin set phpmailer_user, which is not always the case, and as we run several smtpd servers on same machine, we don't authenticate to our smtpd instances because they're local.

===== End Quote =====
Source: http://forums.phplist.com/viewtopic.php?f=17&t=23830#p67628
Additional Informationcipixul suggests the following changes to fix the issue:

===== Start Quote =====

The correct code which works in our case and in all other cases I can think of should be this one:

          if (defined('PHPMAILERHOST') && PHPMAILERHOST != '')
          {
            //logEvent('Sending authenticated email via '.PHPMAILERHOST);
            //$this->addCustomHeader("X-Mailer-Method: Dedicated SMTP");
            $this->SMTPAuth = true;
            $this->Helo = getConfig("website");
            $this->Host = PHPMAILERHOST;
            if ( isset($GLOBALS['phpmailer_smtpuser']) && $GLOBALS['phpmailer_smtpuser'] != ''
                    && isset($GLOBALS['phpmailer_smtppassword']) && $GLOBALS['phpmailer_smtppassword']
            )
            {
                    $this->Username = $GLOBALS['phpmailer_smtpuser'];
                    $this->Password = $GLOBALS['phpmailer_smtppassword'];
            }
            $this->Mailer = "smtp";
          }

===== End Quote =====

Related to: http://mantis.phplist.com/view.php?id=8590
Related forum thread: http://forums.phplist.com/viewtopic.php?f=17&t=23830#p67628
TagsNo tags attached.

Relationships

related to 0008590 resolveduser4391 SMTP code is partially broken 
has duplicate 0015291 resolvedmichiel SMTP send won't work without authentication 

Activities

h2b2

01-11-09 17:42

manager   ~0050766

related to http://mantis.phplist.com/view.php?id=15291