From 776493f53db2636bd55cdebc70f9df7d0d270af2 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Mon, 21 Sep 2026 11:16:19 +0530 Subject: [PATCH 1/6] feat(messaging): accept replyToEmail and replyToName on email messages Add optional reply-to address and name params to the create and update email endpoints, persisted alongside the rest of the message data. Co-Authored-By: Claude Opus 4.8 --- .../Messaging/Http/Messages/Email/Create.php | 7 ++++++- .../Messaging/Http/Messages/Email/Update.php | 13 ++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Messaging/Http/Messages/Email/Create.php b/src/Appwrite/Platform/Modules/Messaging/Http/Messages/Email/Create.php index 06342a0e79..98108e40dd 100644 --- a/src/Appwrite/Platform/Modules/Messaging/Http/Messages/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Messaging/Http/Messages/Email/Create.php @@ -21,6 +21,7 @@ use Utopia\Database\Helpers\ID; use Utopia\Database\Query; use Utopia\Database\Validator\Datetime as DatetimeValidator; use Utopia\Database\Validator\UID; +use Utopia\Emails\Validator\Email; use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Validator\ArrayList; @@ -71,6 +72,8 @@ class Create extends Action ->param('cc', [], fn (Database $dbForProject) => new ArrayList(new UID($dbForProject->getAdapter()->getMaxUIDLength())), 'Array of target IDs to be added as CC.', true, ['dbForProject']) ->param('bcc', [], fn (Database $dbForProject) => new ArrayList(new UID($dbForProject->getAdapter()->getMaxUIDLength())), 'Array of target IDs to be added as BCC.', true, ['dbForProject']) ->param('attachments', [], new ArrayList(new CompoundUID()), 'Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as :.', true) + ->param('replyToEmail', '', new Email(), 'Email address to reply to. If not set, defaults to the sender email address.', true) + ->param('replyToName', '', new Text(128), 'Name of the reply to recipient. If not set, defaults to the sender name.', true) ->param('draft', false, new Boolean(), 'Is message a draft', true) ->param('html', false, new Boolean(), 'Is content of type HTML', true) ->param('scheduledAt', null, new Nullable(new DatetimeValidator(requireDateInFuture: true)), 'Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.', true) @@ -83,7 +86,7 @@ class Create extends Action ->callback($this->action(...)); } - public function action(string $messageId, string $subject, string $content, ?array $topics, ?array $users, ?array $targets, ?array $cc, ?array $bcc, ?array $attachments, bool $draft, bool $html, ?string $scheduledAt, Event $queueForEvents, Database $dbForProject, Database $dbForPlatform, Document $project, MessagingPublisher $publisherForMessaging, Response $response) + public function action(string $messageId, string $subject, string $content, ?array $topics, ?array $users, ?array $targets, ?array $cc, ?array $bcc, ?array $attachments, string $replyToEmail, string $replyToName, bool $draft, bool $html, ?string $scheduledAt, Event $queueForEvents, Database $dbForProject, Database $dbForPlatform, Document $project, MessagingPublisher $publisherForMessaging, Response $response) { $messageId = $messageId == 'unique()' ? ID::unique() @@ -158,6 +161,8 @@ class Create extends Action 'cc' => $cc, 'bcc' => $bcc, 'attachments' => $attachments, + 'replyToEmail' => $replyToEmail, + 'replyToName' => $replyToName, ], 'status' => $status, ]); diff --git a/src/Appwrite/Platform/Modules/Messaging/Http/Messages/Email/Update.php b/src/Appwrite/Platform/Modules/Messaging/Http/Messages/Email/Update.php index 540bb2703e..ab84c7324b 100644 --- a/src/Appwrite/Platform/Modules/Messaging/Http/Messages/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Messaging/Http/Messages/Email/Update.php @@ -17,6 +17,7 @@ use Utopia\Database\DateTime; use Utopia\Database\Document; use Utopia\Database\Validator\Datetime as DatetimeValidator; use Utopia\Database\Validator\UID; +use Utopia\Emails\Validator\Email; use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; use Utopia\Validator\ArrayList; @@ -68,6 +69,8 @@ class Update extends Action ->param('html', null, new Nullable(new Boolean()), 'Is content of type HTML', true) ->param('cc', null, fn (Database $dbForProject) => new Nullable(new ArrayList(new UID($dbForProject->getAdapter()->getMaxUIDLength()))), 'Array of target IDs to be added as CC.', true, ['dbForProject']) ->param('bcc', null, fn (Database $dbForProject) => new Nullable(new ArrayList(new UID($dbForProject->getAdapter()->getMaxUIDLength()))), 'Array of target IDs to be added as BCC.', true, ['dbForProject']) + ->param('replyToEmail', null, new Nullable(new Email()), 'Email address to reply to. If not set, defaults to the sender email address.', true) + ->param('replyToName', null, new Nullable(new Text(128)), 'Name of the reply to recipient. If not set, defaults to the sender name.', true) ->param('scheduledAt', null, new Nullable(new DatetimeValidator(requireDateInFuture: true)), 'Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.', true) ->param('attachments', null, new Nullable(new ArrayList(new CompoundUID())), 'Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as :.', true) ->inject('queueForEvents') @@ -79,7 +82,7 @@ class Update extends Action ->callback($this->action(...)); } - public function action(string $messageId, ?array $topics, ?array $users, ?array $targets, ?string $subject, ?string $content, ?bool $draft, ?bool $html, ?array $cc, ?array $bcc, ?string $scheduledAt, ?array $attachments, Event $queueForEvents, Database $dbForProject, Database $dbForPlatform, Document $project, MessagingPublisher $publisherForMessaging, Response $response) + public function action(string $messageId, ?array $topics, ?array $users, ?array $targets, ?string $subject, ?string $content, ?bool $draft, ?bool $html, ?array $cc, ?array $bcc, ?string $replyToEmail, ?string $replyToName, ?string $scheduledAt, ?array $attachments, Event $queueForEvents, Database $dbForProject, Database $dbForPlatform, Document $project, MessagingPublisher $publisherForMessaging, Response $response) { $message = $dbForProject->getDocument('messages', $messageId); @@ -229,6 +232,14 @@ class Update extends Action $data['bcc'] = $bcc; } + if (!\is_null($replyToEmail)) { + $data['replyToEmail'] = $replyToEmail; + } + + if (!\is_null($replyToName)) { + $data['replyToName'] = $replyToName; + } + $message->setAttribute('data', $data); if (!\is_null($status)) { From 502b531d4a107e10e115a240cb7153eb879d495b Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Mon, 21 Sep 2026 11:16:25 +0530 Subject: [PATCH 2/6] feat(messaging): prefer message reply-to over provider default buildEmailMessage now reads replyToEmail/replyToName from the message data, falling back to the provider options when unset. Co-Authored-By: Claude Opus 4.8 --- src/Appwrite/Platform/Workers/Messaging.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Messaging.php b/src/Appwrite/Platform/Workers/Messaging.php index ce012272cb..d15803565e 100644 --- a/src/Appwrite/Platform/Workers/Messaging.php +++ b/src/Appwrite/Platform/Workers/Messaging.php @@ -1076,9 +1076,9 @@ class Messaging extends Action ): Email { $fromName = $provider['options']['fromName'] ?? null; $fromEmail = $provider['options']['fromEmail'] ?? null; - $replyToEmail = $provider['options']['replyToEmail'] ?? null; - $replyToName = $provider['options']['replyToName'] ?? null; $data = $message['data'] ?? []; + $replyToEmail = !empty($data['replyToEmail']) ? $data['replyToEmail'] : ($provider['options']['replyToEmail'] ?? null); + $replyToName = !empty($data['replyToName']) ? $data['replyToName'] : ($provider['options']['replyToName'] ?? null); $ccTargets = $data['cc'] ?? []; $bccTargets = $data['bcc'] ?? []; $cc = []; From 8b2309f2ce35fb8565abef155a832d5eccd58ff6 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Mon, 21 Sep 2026 11:16:32 +0530 Subject: [PATCH 3/6] test(messaging): cover email reply-to persistence and delivery Add e2e coverage for reply-to fields: persistence and validation on create/update, and the delivered reply-to header over SMTP. Co-Authored-By: Claude Opus 4.8 --- .../e2e/Services/Messaging/MessagingBase.php | 192 ++++++++++++++++++ 1 file changed, 192 insertions(+) diff --git a/tests/e2e/Services/Messaging/MessagingBase.php b/tests/e2e/Services/Messaging/MessagingBase.php index ce999542e1..c13d0c40b1 100644 --- a/tests/e2e/Services/Messaging/MessagingBase.php +++ b/tests/e2e/Services/Messaging/MessagingBase.php @@ -2564,6 +2564,198 @@ trait MessagingBase $this->assertSame(0, \count($message['body']['deliveryErrors'])); } + public function testEmailReplyTo(): void + { + // Create Topic + $topic = $this->client->call(Client::METHOD_POST, '/messaging/topics', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], [ + 'topicId' => ID::unique(), + 'name' => 'topic-reply-to', + ]); + + $this->assertEquals(201, $topic['headers']['status-code']); + + /** + * Test for SUCCESS + */ + $email = $this->client->call(Client::METHOD_POST, '/messaging/messages/email', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], [ + 'messageId' => ID::unique(), + 'draft' => true, + 'topics' => [$topic['body']['$id']], + 'subject' => 'Reply to test', + 'content' => 'Reply to the sender', + 'replyToEmail' => 'reply@example.com', + 'replyToName' => 'Reply Person', + ]); + + $this->assertEquals(201, $email['headers']['status-code']); + $this->assertEquals('reply@example.com', $email['body']['data']['replyToEmail']); + $this->assertEquals('Reply Person', $email['body']['data']['replyToName']); + + $messageId = $email['body']['$id']; + + // Update the reply to fields + $updated = $this->client->call(Client::METHOD_PATCH, '/messaging/messages/email/' . $messageId, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], [ + 'replyToEmail' => 'newreply@example.com', + 'replyToName' => 'New Reply Person', + ]); + + $this->assertEquals(200, $updated['headers']['status-code']); + $this->assertEquals('newreply@example.com', $updated['body']['data']['replyToEmail']); + $this->assertEquals('New Reply Person', $updated['body']['data']['replyToName']); + + // Untouched reply to fields stay intact when other fields are updated + $updated = $this->client->call(Client::METHOD_PATCH, '/messaging/messages/email/' . $messageId, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], [ + 'subject' => 'Reply to test updated', + ]); + + $this->assertEquals(200, $updated['headers']['status-code']); + $this->assertEquals('newreply@example.com', $updated['body']['data']['replyToEmail']); + $this->assertEquals('New Reply Person', $updated['body']['data']['replyToName']); + + /** + * Test for FAILURE + */ + $email = $this->client->call(Client::METHOD_POST, '/messaging/messages/email', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], [ + 'messageId' => ID::unique(), + 'draft' => true, + 'topics' => [$topic['body']['$id']], + 'subject' => 'Reply to test', + 'content' => 'Reply to the sender', + 'replyToEmail' => 'not-an-email', + ]); + + $this->assertEquals(400, $email['headers']['status-code']); + } + + public function testSendEmailWithReplyTo(): void + { + $provider = $this->client->call(Client::METHOD_POST, '/messaging/providers/smtp', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], [ + 'providerId' => ID::unique(), + 'name' => 'Maildev', + 'host' => System::getEnv('_APP_SMTP_HOST', 'maildev'), + 'port' => (int) System::getEnv('_APP_SMTP_PORT', '1025'), + 'username' => System::getEnv('_APP_SMTP_USERNAME', 'user'), + 'password' => System::getEnv('_APP_SMTP_PASSWORD', 'password'), + 'fromName' => 'Appwrite', + 'fromEmail' => 'sender@appwrite.io', + 'enabled' => true, + ]); + + $this->assertEquals(201, $provider['headers']['status-code']); + + $topic = $this->client->call(Client::METHOD_POST, '/messaging/topics', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], [ + 'topicId' => ID::unique(), + 'name' => 'reply-to-send', + ]); + + $this->assertEquals(201, $topic['headers']['status-code']); + + $user = $this->client->call(Client::METHOD_POST, '/users', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], [ + 'userId' => ID::unique(), + 'email' => \uniqid() . '@appwrite.io', + 'password' => 'password', + 'name' => 'Reply To User', + ]); + + $this->assertEquals(201, $user['headers']['status-code']); + + $recipient = \uniqid() . '@appwrite.io'; + $target = $this->client->call(Client::METHOD_POST, '/users/' . $user['body']['$id'] . '/targets', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], [ + 'targetId' => ID::unique(), + 'providerType' => 'email', + 'providerId' => $provider['body']['$id'], + 'identifier' => $recipient, + ]); + + $this->assertEquals(201, $target['headers']['status-code']); + + $subscriber = $this->client->call(Client::METHOD_POST, '/messaging/topics/' . $topic['body']['$id'] . '/subscribers', \array_merge([ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + ], $this->getHeaders()), [ + 'subscriberId' => ID::unique(), + 'targetId' => $target['body']['$id'], + ]); + + $this->assertEquals(201, $subscriber['headers']['status-code']); + + $subject = 'Reply to send ' . \uniqid(); + + $email = $this->client->call(Client::METHOD_POST, '/messaging/messages/email', [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], [ + 'messageId' => ID::unique(), + 'topics' => [$topic['body']['$id']], + 'subject' => $subject, + 'content' => 'Reply to the custom address', + 'replyToEmail' => 'support@appwrite.io', + 'replyToName' => 'Appwrite Support', + ]); + + $this->assertEquals(201, $email['headers']['status-code']); + + $messageId = $email['body']['$id']; + $this->assertEventually(function () use ($messageId) { + $response = $this->client->call(Client::METHOD_GET, '/messaging/messages/' . $messageId, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]); + $this->assertEquals(MessageStatus::SENT, $response['body']['status']); + }, 30000, 500); + + // The custom reply-to overrides the provider default (which falls back to the sender). + $mail = $this->getLastEmail(1, fn (array $mail) => $this->assertSame($subject, $mail['subject'])); + + $replyTo = $mail['headers']['reply-to'] ?? ''; + $this->assertStringContainsString('support@appwrite.io', $replyTo); + $this->assertStringNotContainsString('sender@appwrite.io', $replyTo); + + $this->client->call(Client::METHOD_DELETE, '/messaging/providers/' . $provider['body']['$id'], [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ]); + } + public function testSendSMS(): void { if (empty(System::getEnv('_APP_MESSAGE_SMS_TEST_DSN'))) { From 828030626d96dac555339b3e1cd89a97784626af Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Mon, 21 Sep 2026 11:24:39 +0530 Subject: [PATCH 4/6] fix(messaging): let an empty reply-to restore the default Accept an empty string for replyToEmail so a draft can drop a custom reply-to and fall back to the provider or sender, matching the worker's empty-value handling. Co-Authored-By: Claude Opus 4.8 --- .../Platform/Modules/Messaging/Http/Messages/Email/Create.php | 2 +- .../Platform/Modules/Messaging/Http/Messages/Email/Update.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Messaging/Http/Messages/Email/Create.php b/src/Appwrite/Platform/Modules/Messaging/Http/Messages/Email/Create.php index 98108e40dd..6d5df7ed8a 100644 --- a/src/Appwrite/Platform/Modules/Messaging/Http/Messages/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Messaging/Http/Messages/Email/Create.php @@ -72,7 +72,7 @@ class Create extends Action ->param('cc', [], fn (Database $dbForProject) => new ArrayList(new UID($dbForProject->getAdapter()->getMaxUIDLength())), 'Array of target IDs to be added as CC.', true, ['dbForProject']) ->param('bcc', [], fn (Database $dbForProject) => new ArrayList(new UID($dbForProject->getAdapter()->getMaxUIDLength())), 'Array of target IDs to be added as BCC.', true, ['dbForProject']) ->param('attachments', [], new ArrayList(new CompoundUID()), 'Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as :.', true) - ->param('replyToEmail', '', new Email(), 'Email address to reply to. If not set, defaults to the sender email address.', true) + ->param('replyToEmail', '', new Email(allowEmpty: true), 'Email address to reply to. If not set, defaults to the sender email address.', true) ->param('replyToName', '', new Text(128), 'Name of the reply to recipient. If not set, defaults to the sender name.', true) ->param('draft', false, new Boolean(), 'Is message a draft', true) ->param('html', false, new Boolean(), 'Is content of type HTML', true) diff --git a/src/Appwrite/Platform/Modules/Messaging/Http/Messages/Email/Update.php b/src/Appwrite/Platform/Modules/Messaging/Http/Messages/Email/Update.php index ab84c7324b..18234a5f43 100644 --- a/src/Appwrite/Platform/Modules/Messaging/Http/Messages/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Messaging/Http/Messages/Email/Update.php @@ -69,8 +69,8 @@ class Update extends Action ->param('html', null, new Nullable(new Boolean()), 'Is content of type HTML', true) ->param('cc', null, fn (Database $dbForProject) => new Nullable(new ArrayList(new UID($dbForProject->getAdapter()->getMaxUIDLength()))), 'Array of target IDs to be added as CC.', true, ['dbForProject']) ->param('bcc', null, fn (Database $dbForProject) => new Nullable(new ArrayList(new UID($dbForProject->getAdapter()->getMaxUIDLength()))), 'Array of target IDs to be added as BCC.', true, ['dbForProject']) - ->param('replyToEmail', null, new Nullable(new Email()), 'Email address to reply to. If not set, defaults to the sender email address.', true) - ->param('replyToName', null, new Nullable(new Text(128)), 'Name of the reply to recipient. If not set, defaults to the sender name.', true) + ->param('replyToEmail', null, new Nullable(new Email(allowEmpty: true)), 'Email address to reply to. Pass an empty string to restore the provider or sender default.', true) + ->param('replyToName', null, new Nullable(new Text(128)), 'Name of the reply to recipient. Pass an empty string to restore the provider or sender default.', true) ->param('scheduledAt', null, new Nullable(new DatetimeValidator(requireDateInFuture: true)), 'Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.', true) ->param('attachments', null, new Nullable(new ArrayList(new CompoundUID())), 'Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as :.', true) ->inject('queueForEvents') From bd97325488f1b8152661ead377d49878f3139673 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Mon, 21 Sep 2026 11:24:46 +0530 Subject: [PATCH 5/6] test(messaging): cover reply-to clearing and delivered name Assert an empty string clears the reply-to, and check both the address and display name on the delivered mail. Co-Authored-By: Claude Opus 4.8 --- .../e2e/Services/Messaging/MessagingBase.php | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/tests/e2e/Services/Messaging/MessagingBase.php b/tests/e2e/Services/Messaging/MessagingBase.php index c475f1e9ef..f1233d0cfc 100644 --- a/tests/e2e/Services/Messaging/MessagingBase.php +++ b/tests/e2e/Services/Messaging/MessagingBase.php @@ -2836,6 +2836,20 @@ trait MessagingBase $this->assertEquals('newreply@example.com', $updated['body']['data']['replyToEmail']); $this->assertEquals('New Reply Person', $updated['body']['data']['replyToName']); + // An empty string clears the custom reply to, restoring the provider or sender default + $updated = $this->client->call(Client::METHOD_PATCH, '/messaging/messages/email/' . $messageId, [ + 'content-type' => 'application/json', + 'x-appwrite-project' => $this->getProject()['$id'], + 'x-appwrite-key' => $this->getProject()['apiKey'], + ], [ + 'replyToEmail' => '', + 'replyToName' => '', + ]); + + $this->assertEquals(200, $updated['headers']['status-code']); + $this->assertEquals('', $updated['body']['data']['replyToEmail']); + $this->assertEquals('', $updated['body']['data']['replyToName']); + /** * Test for FAILURE */ @@ -2953,9 +2967,8 @@ trait MessagingBase // The custom reply-to overrides the provider default (which falls back to the sender). $mail = $this->getLastEmail(1, fn (array $mail) => $this->assertSame($subject, $mail['subject'])); - $replyTo = $mail['headers']['reply-to'] ?? ''; - $this->assertStringContainsString('support@appwrite.io', $replyTo); - $this->assertStringNotContainsString('sender@appwrite.io', $replyTo); + $this->assertSame('support@appwrite.io', $mail['replyTo'][0]['address']); + $this->assertSame('Appwrite Support', $mail['replyTo'][0]['name']); $this->client->call(Client::METHOD_DELETE, '/messaging/providers/' . $provider['body']['$id'], [ 'content-type' => 'application/json', From 3b3c627a10b1f04963fa0846b9a40eb4c8aece3a Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Mon, 21 Sep 2026 11:30:48 +0530 Subject: [PATCH 6/6] fix(messaging): allow empty replyToName to clear the default Text defaults to a minimum length of one, so an empty replyToName was rejected. Use Text(128, 0) as the provider create actions do, letting an empty string clear the custom reply-to name. Co-Authored-By: Claude Opus 4.8 --- .../Platform/Modules/Messaging/Http/Messages/Email/Create.php | 2 +- .../Platform/Modules/Messaging/Http/Messages/Email/Update.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Messaging/Http/Messages/Email/Create.php b/src/Appwrite/Platform/Modules/Messaging/Http/Messages/Email/Create.php index 6d5df7ed8a..6a6f719b2b 100644 --- a/src/Appwrite/Platform/Modules/Messaging/Http/Messages/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Messaging/Http/Messages/Email/Create.php @@ -73,7 +73,7 @@ class Create extends Action ->param('bcc', [], fn (Database $dbForProject) => new ArrayList(new UID($dbForProject->getAdapter()->getMaxUIDLength())), 'Array of target IDs to be added as BCC.', true, ['dbForProject']) ->param('attachments', [], new ArrayList(new CompoundUID()), 'Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as :.', true) ->param('replyToEmail', '', new Email(allowEmpty: true), 'Email address to reply to. If not set, defaults to the sender email address.', true) - ->param('replyToName', '', new Text(128), 'Name of the reply to recipient. If not set, defaults to the sender name.', true) + ->param('replyToName', '', new Text(128, 0), 'Name of the reply to recipient. If not set, defaults to the sender name.', true) ->param('draft', false, new Boolean(), 'Is message a draft', true) ->param('html', false, new Boolean(), 'Is content of type HTML', true) ->param('scheduledAt', null, new Nullable(new DatetimeValidator(requireDateInFuture: true)), 'Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.', true) diff --git a/src/Appwrite/Platform/Modules/Messaging/Http/Messages/Email/Update.php b/src/Appwrite/Platform/Modules/Messaging/Http/Messages/Email/Update.php index 18234a5f43..a85f96d4f0 100644 --- a/src/Appwrite/Platform/Modules/Messaging/Http/Messages/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Messaging/Http/Messages/Email/Update.php @@ -70,7 +70,7 @@ class Update extends Action ->param('cc', null, fn (Database $dbForProject) => new Nullable(new ArrayList(new UID($dbForProject->getAdapter()->getMaxUIDLength()))), 'Array of target IDs to be added as CC.', true, ['dbForProject']) ->param('bcc', null, fn (Database $dbForProject) => new Nullable(new ArrayList(new UID($dbForProject->getAdapter()->getMaxUIDLength()))), 'Array of target IDs to be added as BCC.', true, ['dbForProject']) ->param('replyToEmail', null, new Nullable(new Email(allowEmpty: true)), 'Email address to reply to. Pass an empty string to restore the provider or sender default.', true) - ->param('replyToName', null, new Nullable(new Text(128)), 'Name of the reply to recipient. Pass an empty string to restore the provider or sender default.', true) + ->param('replyToName', null, new Nullable(new Text(128, 0)), 'Name of the reply to recipient. Pass an empty string to restore the provider or sender default.', true) ->param('scheduledAt', null, new Nullable(new DatetimeValidator(requireDateInFuture: true)), 'Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.', true) ->param('attachments', null, new Nullable(new ArrayList(new CompoundUID())), 'Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as :.', true) ->inject('queueForEvents')