Fix: Sending mail with SMTPS was not working.
This commit is contained in:
parent
bf0e21e37b
commit
c646b89f55
@ -191,7 +191,7 @@ if (! $server) $server='127.0.0.1';
|
||||
* View
|
||||
*/
|
||||
|
||||
$wikihelp='EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
|
||||
$wikihelp='EN:Setup EMails|FR:Paramétrage EMails|ES:Configuración EMails';
|
||||
llxHeader($langs->trans("Setup"),'',$wikihelp);
|
||||
|
||||
print_fiche_titre($langs->trans("EMailsSetup"),'','setup');
|
||||
@ -481,7 +481,7 @@ else
|
||||
print_titre($langs->trans("DoTestServerAvailability"));
|
||||
|
||||
// If we use SSL/TLS
|
||||
if (! empty($conf->global->MAIN_MAIL_EMAIL_TLS)) $server='ssl://'.$server;
|
||||
if (! empty($conf->global->MAIN_MAIL_EMAIL_TLS) && function_exists('openssl_open')) $server='ssl://'.$server;
|
||||
|
||||
include_once(DOL_DOCUMENT_ROOT."/lib/CMailFile.class.php");
|
||||
$mail = new CMailFile('','','','');
|
||||
|
||||
@ -524,7 +524,7 @@ class CMailFile
|
||||
|
||||
// If we use SSL/TLS
|
||||
$server=$conf->global->MAIN_MAIL_SMTP_SERVER;
|
||||
if (! empty($conf->global->MAIN_MAIL_EMAIL_TLS)) $server='ssl://'.$server;
|
||||
if (! empty($conf->global->MAIN_MAIL_EMAIL_TLS) && function_exists('openssl_open')) $server='ssl://'.$server;
|
||||
|
||||
$this->smtps->setHost($server);
|
||||
$this->smtps->setPort($conf->global->MAIN_MAIL_SMTP_PORT); // 25, 465...;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user