From 7c10c55b1ce292d750cf392cb38d7b4e22c43175 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 10 Oct 2023 14:14:41 +0200 Subject: [PATCH] fix: only send email if transactional email set --- app/Models/S3Storage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/S3Storage.php b/app/Models/S3Storage.php index 03953d319..21414681c 100644 --- a/app/Models/S3Storage.php +++ b/app/Models/S3Storage.php @@ -46,7 +46,7 @@ class S3Storage extends BaseModel return; } catch (\Throwable $e) { $this->is_usable = false; - if ($this->unusable_email_sent === false) { + if ($this->unusable_email_sent === false && is_transactional_emails_active()) { $mail = new MailMessage(); $mail->subject('Coolify: S3 Storage Connection Error'); $mail->view('emails.s3-connection-error', ['name' => $this->name, 'reason' => $e->getMessage(), 'url' => route('team.storages.show', ['storage_uuid' => $this->uuid])]);