diff --git a/htdocs/includes/smtps/SMTPs.php b/htdocs/includes/smtps/SMTPs.php index fb6e279af97..4d60aa1e797 100644 --- a/htdocs/includes/smtps/SMTPs.php +++ b/htdocs/includes/smtps/SMTPs.php @@ -658,7 +658,9 @@ class SMTPs // This connection attempt failed. else { - $this->_setErr ( $this->errno, $this->errstr ); + // DOL_CHANGE LDR + if (empty($this->errstr)) $this->errstr='Failed to connect with fsockopen host='.$this->getHost().' port='.$this->getPort(); + $this->_setErr ( $this->errno, $this->errstr ); $_retVal = false; } } @@ -2517,6 +2519,9 @@ class SMTPs /** * $Log$ + * Revision 1.13 2010/04/13 20:58:37 eldy + * Fix: Can provide ip address on smtps. Better error reporting. + * * Revision 1.12 2010/04/13 20:30:25 eldy * Fix: Can provide ip address on smtps. Better error reporting. * diff --git a/htdocs/lib/CMailFile.class.php b/htdocs/lib/CMailFile.class.php index 88315b39e21..2bd20a46be0 100644 --- a/htdocs/lib/CMailFile.class.php +++ b/htdocs/lib/CMailFile.class.php @@ -401,17 +401,18 @@ class CMailFile { if (! empty($conf->global->MAIN_MAIL_DEBUG)) $this->smtps->setDebug(true); $result=$this->smtps->sendMsg(); - if (! $result) - { - $this->error=$this->smtps->getErrors(); - } + //print $result; } if (! empty($conf->global->MAIN_MAIL_DEBUG)) $this->dump_mail(); $result=$this->smtps->getErrors(); if (empty($this->error) && empty($result)) $res=true; - else $res=false; + else + { + if (empty($this->error)) $this->error=$result; + $res=false; + } } else