From 4193353ff0285c2f157d5cbcbbc859a709be9dc5 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 21 May 2026 04:42:18 +1200 Subject: [PATCH] fix: skip smtp validation when clearing sender email --- .../Platform/Modules/Project/Http/Project/SMTP/Update.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Modules/Project/Http/Project/SMTP/Update.php b/src/Appwrite/Platform/Modules/Project/Http/Project/SMTP/Update.php index ef2e478d96..81c4c49f87 100644 --- a/src/Appwrite/Platform/Modules/Project/Http/Project/SMTP/Update.php +++ b/src/Appwrite/Platform/Modules/Project/Http/Project/SMTP/Update.php @@ -121,7 +121,7 @@ class Update extends Action // Validate when the caller is explicitly enabling or hasn't expressed a preference // (so a credentials-only PATCH can auto-enable). Skip only when the caller is // explicitly keeping/turning SMTP off. - if (\is_null($enabled) || $enabled === true) { + if ((\is_null($enabled) || $enabled === true) && !empty($smtp['senderEmail'])) { $mail = new PHPMailer(true); $mail->isSMTP();