Component evidence
Parses RFC-compliant enhanced SMTP status codes from reply text.
// Source: https://github.com/dahlia/upyo | License: MIT | Copyright 2025 Hong Minhee
// Provided via justclaw.it.com; keep this notice with the code.
import type { SmtpEnhancedStatusCode } from "./smtp-receipt.ts";
/**
* Parses an enhanced SMTP status code from the beginning of reply text.
*
* RFC 2034 requires the enhanced class to agree with the three-digit SMTP
* reply class. RFC 3463 also prohibits leading zeroes and limits the subject
* and detail fields to three digits.
*
* @param replyCode The three-digit SMTP reply code.
* @param response The textual part of the SMTP reply.
* @returns The parsed enhanced status code, or `undefined` when the reply does
* not begin with a valid, consistent code.
* @since 0.6.0
*/
export function parseEnhancedSmtpStatusCode(
... (truncated -- full source via MCP)