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:
parent
c162c0dbab
commit
b2e4cefe5f
@ -240,7 +240,6 @@ switch ($resource) {
|
||||
$search_fields[] = 'citta LIKE '.prepare('%'.$search.'%');
|
||||
}
|
||||
|
||||
|
||||
$custom['idzona'] = 'idzona';
|
||||
}
|
||||
break;
|
||||
|
@ -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 [
|
||||
|
Loading…
Reference in New Issue
Block a user