readEmailConfig (src/config.ts)

bitterbot-desktop · extensions/email/src/config.ts · typescript · MIT
email

Reads and resolves email configuration with validation for IMAP/SMTP servers and defaults.

// Source: https://github.com/Bitterbot-AI/bitterbot-desktop | License: MIT | Copyright 2025-2026 Victor Michael Gil / Bitterbot AI
// Provided via justclaw.it.com; keep this notice with the code.
import { z } from "zod";

const ServerSchema = z
  .object({
    host: z.string().min(1),
    port: z.number().int().positive().optional(),
    /** TLS from the first byte (993/465). Default: true for 993/465. */
    secure: z.boolean().optional(),
    /** Defaults to the channel address. */
    user: z.string().optional(),
    password: z.string().optional(),
  })
  .strict();

export const EmailConfigSchema = z
  .object({
    enabled: z.boolean().optional(),
    /** The agent's own address: replies come from it. */
    address: z.string().min(3),
    /** Shared password for IMAP and SMTP when 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key