mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
añadido mensajeria
This commit is contained in:
@ -13,7 +13,7 @@ class EmailService
|
||||
|
||||
// Si no estamos en producción, forzar el destinatario a uno fijo
|
||||
if ($skEnv !== 'production') {
|
||||
$recipient = env('MAIL_DEV_RECIPIENT', 'imnavajas@coit.es'); // fallback opcional
|
||||
$recipient = env('MAIL_DEV_RECIPIENT', 'imnavajas@coit.es,info@jjimenez.eu'); // fallback opcional
|
||||
}
|
||||
|
||||
$settings_model = model('App\Models\Configuracion\ConfigVariableModel');
|
||||
@ -43,7 +43,13 @@ class EmailService
|
||||
$email->setSubject($subject);
|
||||
$email->setMessage($body);
|
||||
|
||||
return $email->send();
|
||||
if (!$email->send()) {
|
||||
log_message('error', 'Error enviando email: ' . $email->printDebugger(['headers', 'subject', 'body']));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
} catch (\Throwable $e) {
|
||||
log_message('error', 'EmailService failed: ' . $e->getMessage());
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user