NewWacht Bench is live — AI-assisted development for Wacht

verifySmtpConnection()

Attempts SMTP verification using the provided config payload.

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 verifySmtp(config: SmtpConfigRequest) {  const client = await wachtClient();  return client.settings.verifySmtpConnection(config);}

Signature

function verifySmtpConnection(  request: SmtpConfigRequest,): Promise<SmtpVerifyResponse>

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

success?: boolean | undefined;
Whether verification succeeded.
message?: string | undefined;
Verification message when present.

Behavior

  • Wraps the corresponding backend endpoint for this capability.
  • Use the returned payload as canonical backend state for follow-up operations.

On this page