Skip to content
Snippets Groups Projects
Commit c646b89f authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Sending mail with SMTPS was not working.

parent bf0e21e3
No related branches found
No related tags found
No related merge requests found
......@@ -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...;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment