formatPollError (gateway/relay.ts)

gitingest_agenticmail_agenticmail · packages/core/src/gateway/relay.ts · typescript · MIT
email

Formats and redacts detailed error information for email relay operations.

// Source: https://github.com/agenticmail/agenticmail | License: MIT | Copyright 2026 Ope Olatunji
// Provided via justclaw.it.com; keep this notice with the code.
import nodemailer from 'nodemailer';
import MailComposer from 'nodemailer/lib/mail-composer/index.js';
import type { Transporter } from 'nodemailer';
import { ImapFlow } from 'imapflow';
import { simpleParser, type AddressObject } from 'mailparser';
import type { RelayConfig } from './types.js';
import type { SendMailOptions, SendResult } from '../mail/types.js';
import type { SendResultWithRaw } from '../mail/sender.js';
import { debug } from '../debug.js';

export interface RelayGatewayOptions {
  onInboundMail?: (agentName: string, parsed: InboundEmail) => void | Promise<void>;
  /** Fallback agent name for emails without sub

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

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

Get a free API key