Эх сурвалжийг харах

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
FusionPBX 2 жил өмнө
parent
commit
aebfa43af2

+ 10 - 1
resources/classes/email.php

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