From 53b2035def91dc0fe6d8f68e4a34aca2acc79ec8 Mon Sep 17 00:00:00 2001 From: yehudah Date: Sat, 20 Jun 2020 21:39:39 +0000 Subject: Email log improvements: Solution column, filter. Some text clarify. --- Postman/Postman-Email-Log/PostmanEmailLogService.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Postman/Postman-Email-Log/PostmanEmailLogService.php') 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 ) ) { -- cgit v1.2.3