mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-21 14:00:53 +01:00
Fix per test connessione al server SMTP
This commit is contained in:
parent
c11c5f0fa5
commit
6315861a07
@ -66,11 +66,15 @@ switch (post('op')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$mail = new Mail($id_record);
|
$mail = new Mail($id_record);
|
||||||
|
if (!empty((array)$mail)){
|
||||||
if ($mail->testSMTP()) {
|
if ($mail->testSMTP()) {
|
||||||
$_SESSION['infos'][] = tr('Connessione SMTP riuscita');
|
$_SESSION['infos'][] = tr('Connessione SMTP riuscita');
|
||||||
} else {
|
} else {
|
||||||
$_SESSION['errors'][] = tr('Connessione SMTP non riuscita');
|
$_SESSION['errors'][] = tr('Connessione SMTP non riuscita');
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
$_SESSION['errors'][] = tr('Errore.');
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -225,11 +225,15 @@ class Mail extends PHPMailer\PHPMailer\PHPMailer
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Testa la connessione al server SMTP
|
||||||
|
*
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
public function testSMTP()
|
public function testSMTP()
|
||||||
{
|
{
|
||||||
if ($this->IsSMTP() && $this->smtpConnect()) {
|
if ($this->smtpConnect()) {
|
||||||
$this->smtpClose();
|
$this->smtpClose();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user