Skip to content

Commit

Permalink
Use new namespaced PHPMailer exception
Browse files Browse the repository at this point in the history
Fixes #25566
  • Loading branch information
dregad committed Mar 5, 2019
1 parent c69b096 commit 37eef75
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/email_api.php
Expand Up @@ -75,6 +75,7 @@
require_api( 'utility_api.php' );

use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
use Mantis\Exceptions\ClientException;

# reusable object of class SMTP
Expand Down Expand Up @@ -1353,7 +1354,7 @@ function email_send( EmailData $p_email_data ) {
try {
$t_mail->AddAddress( $t_recipient, '' );
}
catch ( phpmailerException $e ) {
catch ( Exception $e ) { # PHPMailer exception
log_event( LOG_EMAIL, $t_log_msg . $t_mail->ErrorInfo );
$t_success = false;
$t_mail->ClearAllRecipients();
Expand Down Expand Up @@ -1401,7 +1402,7 @@ function email_send( EmailData $p_email_data ) {
$t_success = false;
}
}
catch ( phpmailerException $e ) {
catch ( Exception $e ) { # PHPMailer exception
log_event( LOG_EMAIL, $t_log_msg . $t_mail->ErrorInfo );
$t_success = false;
}
Expand Down

0 comments on commit 37eef75

Please sign in to comment.