appwrite/appwrite · error · Appwrite\Extend\Exception
project_smtp_config_invalid
project_smtp_config_invalid
Error message
$error->getMessage()
What it means
Error "$error->getMessage()" thrown in appwrite/appwrite.
Source
Thrown at src/Appwrite/Platform/Modules/Project/Http/Project/SMTP/Update.php:167
\gethostname() ?: 'localhost',
$credentials,
$encryption,
new Timeouts(connect: 5.0, read: 5.0, write: 5.0),
);
try {
// Nothing is dialled until a session is needed, so asking what
// the server offers is what greets, upgrades and authenticates.
$client->capabilities();
// Auto-enable if configuration is valid
// Dont do this if specifically request to mark disabled
if (\is_null($enabled)) {
$smtp['enabled'] = true;
}
} catch (Throwable $error) {
if (($smtp['enabled'] ?? null) === true) {
throw new Exception(Exception::PROJECT_SMTP_CONFIG_INVALID, $error->getMessage());
}
} finally {
$client->close();
}
}
// Save configuration
$updates = new Document([
'smtp' => $smtp,
]);
$project = $authorization->skip(fn () => $dbForPlatform->updateDocument('projects', $project->getId(), $updates));
$authorization->skip(fn () => $dbForPlatform->purgeCachedDocument('projects', $project->getId()));
$response->dynamic($project, Response::MODEL_PROJECT);
}
}
View on GitHub (pinned to feb9831e60)
Solutions
- Inspect the mail error details in the server logs and fix the SMTP configuration.
- Verify SMTP host, port, credentials, and TLS settings, then retry.
When it happens
Trigger: Thrown at src/Appwrite/Platform/Modules/Project/Http/Project/SMTP/Update.php:167 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of appwrite/appwrite@feb9831e60 (2026-08-18).
Data as JSON: /api/errors/d5eb149cc0ec7f48.
Report an issue: GitHub.