Mensajes de error de correos

This commit is contained in:
2024-07-03 11:28:40 -06:00
parent b035ca6243
commit 9d4e77f138
3 changed files with 8 additions and 2 deletions

View File

@@ -194,7 +194,11 @@ try{
exit(); exit();
} }
MandaCorreos::enviarCorreo($db, $asunto, $texto, $user->facultad["facultad_id"], MandaCorreos::COORDINADOR); if(!MandaCorreos::enviarCorreo($db, $asunto, $texto, $user->facultad["facultad_id"], MandaCorreos::COORDINADOR)){
echo "ERROR Correo<br>";
//header("Location: ".$pag."?error=2");
exit();
}
header("Location: ".$pag."?ok=0"); header("Location: ".$pag."?ok=0");

View File

@@ -82,6 +82,7 @@ class Mailer{
if ($mail->Send()) { if ($mail->Send()) {
return true; return true;
}else{ }else{
echo $mail->ErrorInfo;
echo "Error al enviar correo"; echo "Error al enviar correo";
return false; return false;
} }

View File

@@ -77,9 +77,10 @@ class MandaCorreos{
if($_ENV['DB_NAME'] == "paad_pruebas" || self::PRUEBAS){ if($_ENV['DB_NAME'] == "paad_pruebas" || self::PRUEBAS){
$asunto = "PRUEBAS-".$asunto; $asunto = "PRUEBAS-".$asunto;
} }
Mailer::enviarCorreo($to, $asunto, $texto, true); return Mailer::enviarCorreo($to, $asunto, $texto, true);
} }
return true;
} }
} }
?> ?>