diff --git a/composer.json b/composer.json index 9042cb088f..79dd9040a6 100644 --- a/composer.json +++ b/composer.json @@ -62,7 +62,7 @@ "utopia-php/image": "0.8.*", "utopia-php/locale": "0.8.*", "utopia-php/logger": "0.6.*", - "utopia-php/messaging": "0.18.*", + "utopia-php/messaging": "0.19.*", "utopia-php/migration": "1.*", "utopia-php/orchestration": "0.9.*", "utopia-php/platform": "0.7.*", diff --git a/composer.lock b/composer.lock index b544b18aab..3608d91b03 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "773efb29b9b584b1249790e0016c823a", + "content-hash": "568800edca746c4e8d0d50648b25f589", "packages": [ { "name": "adhocore/jwt", @@ -4136,16 +4136,16 @@ }, { "name": "utopia-php/messaging", - "version": "0.18.2", + "version": "0.19.0", "source": { "type": "git", "url": "https://github.com/utopia-php/messaging.git", - "reference": "0d364edacf4d4867964c7e17f653031dd39394bf" + "reference": "0b866d54e70c792a3c4f5ca9c12a6d358a31f4b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/messaging/zipball/0d364edacf4d4867964c7e17f653031dd39394bf", - "reference": "0d364edacf4d4867964c7e17f653031dd39394bf", + "url": "https://api.github.com/repos/utopia-php/messaging/zipball/0b866d54e70c792a3c4f5ca9c12a6d358a31f4b8", + "reference": "0b866d54e70c792a3c4f5ca9c12a6d358a31f4b8", "shasum": "" }, "require": { @@ -4181,9 +4181,9 @@ ], "support": { "issues": "https://github.com/utopia-php/messaging/issues", - "source": "https://github.com/utopia-php/messaging/tree/0.18.2" + "source": "https://github.com/utopia-php/messaging/tree/0.19.0" }, - "time": "2025-07-21T18:27:03+00:00" + "time": "2025-10-14T11:46:49+00:00" }, { "name": "utopia-php/migration", diff --git a/src/Appwrite/Platform/Workers/Messaging.php b/src/Appwrite/Platform/Workers/Messaging.php index 668993fdae..abf46e67a4 100644 --- a/src/Appwrite/Platform/Workers/Messaging.php +++ b/src/Appwrite/Platform/Workers/Messaging.php @@ -593,6 +593,14 @@ class Messaging extends Action $content = $data['content']; $html = $data['html'] ?? false; + // For SMTP, move all recipients to BCC and use default recipient in TO field + if ($provider->getAttribute('provider') === 'smtp') { + foreach ($to as $recipient) { + $bcc[] = ['email' => $recipient]; + } + $to = []; + } + return new Email( $to, $subject,