diff options
author | yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> | 2020-06-20 21:39:39 +0000 |
---|---|---|
committer | yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> | 2020-06-20 21:39:39 +0000 |
commit | 53b2035def91dc0fe6d8f68e4a34aca2acc79ec8 (patch) | |
tree | 03e818494b3390d3e7ed4aedac0a50f0b722f0a3 /Postman/Postman-Email-Log/PostmanEmailLogService.php | |
parent | 67430a4a94c041c57cb4043fcd05c85365ee17f5 (diff) | |
download | Post-SMTP-53b2035def91dc0fe6d8f68e4a34aca2acc79ec8.zip |
Email log improvements: Solution column, filter.
Some text clarify.
Diffstat (limited to 'Postman/Postman-Email-Log/PostmanEmailLogService.php')
-rw-r--r-- | Postman/Postman-Email-Log/PostmanEmailLogService.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Postman/Postman-Email-Log/PostmanEmailLogService.php b/Postman/Postman-Email-Log/PostmanEmailLogService.php index 457baf9..17269e1 100644 --- a/Postman/Postman-Email-Log/PostmanEmailLogService.php +++ b/Postman/Postman-Email-Log/PostmanEmailLogService.php @@ -5,6 +5,7 @@ if ( ! defined( 'ABSPATH' ) ) { require_once dirname(__DIR__ ) . '/PostmanLogFields.php'; require_once POST_SMTP_PATH . '/Postman/Extensions/Core/Notifications/PostmanNotify.php'; +require_once POST_SMTP_PATH . '/Postman/Extensions/Core/StatusSolution.php'; if ( ! class_exists( 'PostmanEmailLog' ) ) { class PostmanEmailLog { @@ -175,7 +176,10 @@ if ( ! class_exists( 'PostmanEmailLogService' ) ) { $this->logger->debug( sprintf( 'Saved message #%s to the database', $post_id ) ); $this->logger->trace( $log ); + $solution = apply_filters( 'post_smtp_log_solution', null, $new_status, $log, $message ); + // Write the meta data related to the email + PostmanLogFields::get_instance()->update( $post_id, 'solution', $solution ); PostmanLogFields::get_instance()->update( $post_id, 'success', $log->success ); PostmanLogFields::get_instance()->update( $post_id, 'from_header', $log->sender ); if ( ! empty( $log->toRecipients ) ) { |