NewWacht Bench is live — AI-assisted development for Wacht

updateSmtpConfig()

Stores SMTP transport settings and returns the resolved SMTP config.

Usage

The following example shows a basic usage of the backend client from @wacht/nextjs/server.

import { wachtClient } from '@wacht/nextjs/server';export async function updateSmtp() {  const client = await wachtClient();  return client.settings.updateSmtpConfig({    host: 'smtp.example.com',    port: 587,    username: 'mailer',    password: 'secret',    from_email: 'no-reply@example.com',    use_tls: true,  });}

Signature

function updateSmtpConfig(  request: SmtpConfigRequest,): Promise<SmtpConfigResponse>

SmtpConfigRequest

host?: string | undefined;
SMTP host.
port?: number | undefined;
SMTP port.
username?: string | undefined;
SMTP username.
password?: string | undefined;
SMTP password/secret.
from_email?: string | undefined;
Sender email.
use_tls?: boolean | undefined;
Whether to use TLS.

Return value

host?: string | undefined;
Stored SMTP host.
port?: number | undefined;
Stored SMTP port.
username?: string | undefined;
Stored SMTP username.
from_email?: string | undefined;
Stored sender email.
use_tls?: boolean | undefined;
Stored TLS setting.
verified?: boolean | undefined;
Whether SMTP is verified.

Behavior

  • Applies a partial update and returns the server-side updated resource.
  • Treat omitted optional fields as unchanged unless explicitly documented otherwise.

On this page