From 48721c85ebcfa973ee81719d2467ca80e4253dc9 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Fri, 01 May 2026 17:30:03 +0000
Subject: [PATCH] =Edmonton Ink hard test begins! Real testing of the managers and reset routes will commence. So far, just ensuring our classes are all loaded correctly: Site() and its sub-classes Membership, Login, etc. Care should be taken to load conditionally on 'init', as we finish defining most settings by 'plugins_loaded' at priority 5

---
 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