1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-25 06:55:05 +01:00

Fix invio email da API per Applicazione

This commit is contained in:
Thomas Zilio 2020-08-07 16:05:11 +02:00
parent c162c0dbab
commit b2e4cefe5f
2 changed files with 6 additions and 5 deletions

View File

@ -240,7 +240,6 @@ switch ($resource) {
$search_fields[] = 'citta LIKE '.prepare('%'.$search.'%');
}
$custom['idzona'] = 'idzona';
}
break;

View File

@ -64,11 +64,13 @@ class RapportinoIntervento extends Resource implements RetrieveInterface, Create
$mail->save();
// Tentativo di invio diretto
$email = EmailNotification::build($mail);
try {
$email_success = $email->send();
} catch (\PHPMailer\PHPMailer\Exception $e) {
$email_success = false;
$email_success = $email->send();
// Rimozione email in casi di errore
if (!$email_success) {
$mail->delete();
}
return [