From ad5a7da8fae2e194694a743ce52f1a71bb4710ca Mon Sep 17 00:00:00 2001 From: Nicolas Rochelemagne Date: Fri, 30 Mar 2012 09:18:28 -0500 Subject: [PATCH 9/9] case 42681 need to use account before username --- libs/Atmail/Global.php | 24 +++++++++--------------- 1 files changed, 9 insertions(+), 15 deletions(-) diff --git a/libs/Atmail/Global.php b/libs/Atmail/Global.php index 3a33a8d..b118012 100644 --- a/libs/Atmail/Global.php +++ b/libs/Atmail/Global.php @@ -204,21 +204,15 @@ function auth($mailauth=null) exit; } - // Choose which method to authenticate to the mail server. [username] or [username@host] - if ( $pref['mailserver_auth'] || $_REQUEST['MailAuth'] || $mailauth || $this->MailAuth) - { - if (!$mail->login( $this->auth->get_account(), $this->auth->get_password() )) - $loginstatus = $mail->lasterror(); - $this->MailA = 1; - } - else - { - if (!$mail->login( $this->auth->get_username(), $this->auth->get_password() )) - $loginstatus = $mail->lasterror(); - $this->MailA = ''; - } - - $mail->quit(); + // Choose which method to authenticate to the mail server. [username] or [username@host] + /* cPanel case 42681 : need to use account before username */ + $this->MailA = 1; + if (!$mail->login( $this->auth->get_account(), $this->auth->get_password() )) { + if (!$mail->login( $this->auth->get_username(), $this->auth->get_password() )) + $loginstatus = $mail->lasterror(); + $this->MailA = ''; + } + $mail->quit(); if (strpos($loginstatus, '-ERR') !== false && !$mailauth ) { -- 1.7.5