Save the email response (#6558)

* Save the email response

* use the response variable from the email class

* Rename email_debug to email_response

* Update app_languages.php

* Show the email response

* Save the email response
This commit is contained in:
FusionPBX
2023-02-17 12:47:11 -07:00
committed by GitHub
parent 7dbfd22acb
commit 97dbe7b31a
6 changed files with 62 additions and 29 deletions

View File

@@ -561,8 +561,17 @@ if (!class_exists('email')) {
}
}
//save output to a buffer
ob_start();
//send the email
if (!$mail->Send()) {
$mail_status = $mail->Send();
//get the output buffer
$this->response = ob_get_clean();
//send the email
if (!$mail_status) {
if (isset($mail->ErrorInfo) && strlen($mail->ErrorInfo) > 0) {
$this->error = $mail->ErrorInfo;
}