diff --git a/action/solicitud_insert.php b/action/solicitud_insert.php index a2bd3cd..71d4dad 100644 --- a/action/solicitud_insert.php +++ b/action/solicitud_insert.php @@ -194,7 +194,11 @@ try{ 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
"; + //header("Location: ".$pag."?error=2"); + exit(); +} header("Location: ".$pag."?ok=0"); diff --git a/class/mailer.php b/class/mailer.php index c12d802..35ab593 100644 --- a/class/mailer.php +++ b/class/mailer.php @@ -82,6 +82,7 @@ class Mailer{ if ($mail->Send()) { return true; }else{ + echo $mail->ErrorInfo; echo "Error al enviar correo"; return false; } diff --git a/class/manda_correo.php b/class/manda_correo.php index af18a62..2cd006c 100644 --- a/class/manda_correo.php +++ b/class/manda_correo.php @@ -77,9 +77,10 @@ class MandaCorreos{ if($_ENV['DB_NAME'] == "paad_pruebas" || self::PRUEBAS){ $asunto = "PRUEBAS-".$asunto; } - Mailer::enviarCorreo($to, $asunto, $texto, true); + return Mailer::enviarCorreo($to, $asunto, $texto, true); } + return true; } } ?> \ No newline at end of file