From 2127b1bdd73ecd2423e443992da4b442f5a3c1a3 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Wed, 04 Feb 2026 21:19:25 +0000
Subject: [PATCH] =Major overhaul of MetaManager.php -> Meta.php and RestRouteManager.php -> Rest.php. Seems to work for JakeVan

---
 inc/integrations/PostMark.php |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/inc/integrations/PostMark.php b/inc/integrations/PostMark.php
index baac1bc..9882d6c 100644
--- a/inc/integrations/PostMark.php
+++ b/inc/integrations/PostMark.php
@@ -21,6 +21,7 @@
 	protected string $from_name;
 	protected bool $track_open;
 	protected bool $track_links;
+	protected ?string $lastMessageId = null;
 	/**
 	 * Constructor
 	 */
@@ -257,6 +258,9 @@
 	 */
 	protected function sendEmail(array $payload): bool|WP_Error
 	{
+		if (!$this->isSetUp()) {
+			return false;
+		}
 		try {
 			$response = $this->postRequest('email', $payload);
 
@@ -415,9 +419,7 @@
 
 		// Clean up whitespace
 		$text = preg_replace('/\s+/', ' ', $text);
-		$text = trim($text);
-
-		return $text;
+		return trim($text);
 	}
 
 	/**

--
Gitblit v1.10.0