diff --git a/composer.lock b/composer.lock index 0d112275d8..bbbf124068 100644 --- a/composer.lock +++ b/composer.lock @@ -4679,12 +4679,12 @@ "source": { "type": "git", "url": "https://github.com/utopia-php/migration.git", - "reference": "9813afb2d7e0ddf8f00002fa30c0318d697e8d97" + "reference": "edcb0aa3285b44616e570e5fe092aaac97deb686" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/migration/zipball/9813afb2d7e0ddf8f00002fa30c0318d697e8d97", - "reference": "9813afb2d7e0ddf8f00002fa30c0318d697e8d97", + "url": "https://api.github.com/repos/utopia-php/migration/zipball/edcb0aa3285b44616e570e5fe092aaac97deb686", + "reference": "edcb0aa3285b44616e570e5fe092aaac97deb686", "shasum": "" }, "require": { @@ -4744,7 +4744,7 @@ "source": "https://github.com/utopia-php/migration/tree/add-email-templates-migration", "issues": "https://github.com/utopia-php/migration/issues" }, - "time": "2026-05-21T15:55:26+00:00" + "time": "2026-05-21T16:14:58+00:00" }, { "name": "utopia-php/mongo", diff --git a/tests/e2e/Services/Migrations/MigrationsBase.php b/tests/e2e/Services/Migrations/MigrationsBase.php index 95967587ac..bc30a21490 100644 --- a/tests/e2e/Services/Migrations/MigrationsBase.php +++ b/tests/e2e/Services/Migrations/MigrationsBase.php @@ -3126,17 +3126,20 @@ trait MigrationsBase $sourceProjectId = $this->getProject()['$id']; $destinationProjectId = $this->getDestinationProject()['$id']; - // The source SDK path requires custom SMTP enabled before a template can be saved. - $this->client->call(Client::METHOD_PATCH, '/projects/' . $sourceProjectId . '/smtp', $consoleHeaders, [ + // The source SDK path requires custom SMTP enabled before a template can be + // saved — and the enable call validates the SMTP connection. `maildev` is the + // dev mailcatcher in the test cluster's docker-compose; it accepts unauthenticated + // connections on port 1025, so it's the only host that lets us pass validation. + $smtpHost = 'maildev'; + $smtpPort = 1025; + $smtpUpdate = $this->client->call(Client::METHOD_PATCH, '/projects/' . $sourceProjectId . '/smtp', $consoleHeaders, [ 'enabled' => true, 'senderName' => 'Test Sender', 'senderEmail' => 'sender@example.com', - 'host' => 'smtp.example.com', - 'port' => 587, - 'username' => 'test', - 'password' => 'test', - 'secure' => 'tls', + 'host' => $smtpHost, + 'port' => $smtpPort, ]); + $this->assertEquals(200, $smtpUpdate['headers']['status-code'], 'SMTP enable on source failed: ' . \json_encode($smtpUpdate['body'])); $templateId = 'verification'; $locale = 'en'; @@ -3181,11 +3184,8 @@ trait MigrationsBase 'enabled' => true, 'senderName' => 'Dest Sender', 'senderEmail' => 'dest@example.com', - 'host' => 'smtp.example.com', - 'port' => 587, - 'username' => 'test', - 'password' => 'test', - 'secure' => 'tls', + 'host' => $smtpHost, + 'port' => $smtpPort, ]); $fetched = $this->client->call(