/**
 * RFC-compliant Email Address Utilities for Nodemailer Provider
 *
 * Provides utilities for parsing and formatting email addresses
 * according to RFC 5322, RFC 2047, and related standards.
 *
 * @module @strapi/provider-email-nodemailer/utils
 */
export interface ParsedEmailAddress {
    /** Display name (decoded if RFC 2047 encoded) */
    name: string | null;
    /** Email address (normalized to lowercase per RFC 5321) */
    email: string;
    /** Original unparsed string */
    original: string;
}
/**
 * Normalizes an email address to lowercase.
 *
 * Per RFC 5321 section 2.4, the domain part of an email address is
 * case-insensitive. While the local part is technically case-sensitive,
 * in practice virtually all mail systems treat it as case-insensitive.
 * Major providers (Gmail, Outlook, Yahoo, etc.) all normalize to lowercase.
 *
 * @see https://datatracker.ietf.org/doc/html/rfc5321#section-2.4
 */
export declare const normalizeEmail: (email: string) => string;
/**
 * Decodes RFC 2047 encoded-words
 * Supports both Base64 (B) and Quoted-Printable (Q) encodings
 *
 * @example
 * decodeRfc2047('=?UTF-8?B?U3RyYXBp?=')
 * // 'Strapi'
 *
 * @example
 * decodeRfc2047('=?UTF-8?Q?M=C3=BCller?=')
 * // 'Müller'
 *
 * @see https://datatracker.ietf.org/doc/html/rfc2047
 */
export declare const decodeRfc2047: (encoded: string) => string;
/**
 * Encodes a string as RFC 2047 Base64 encoded-word
 * Use this when the display name contains non-ASCII characters
 *
 * @example
 * encodeRfc2047Base64('Müller')
 * // '=?UTF-8?B?TcO8bGxlcg==?='
 *
 * @see https://datatracker.ietf.org/doc/html/rfc2047
 */
export declare const encodeRfc2047Base64: (str: string) => string;
/**
 * Encodes a string as RFC 2047 Quoted-Printable encoded-word
 *
 * @example
 * encodeRfc2047QuotedPrintable('Müller')
 * // '=?UTF-8?Q?M=C3=BCller?='
 */
export declare const encodeRfc2047QuotedPrintable: (str: string) => string;
/**
 * Extracts RFC 5322 comments from an email string
 * Comments are enclosed in parentheses
 *
 * @example
 * extractComments('email@example.com (Support Team)')
 * // { text: 'email@example.com', comments: ['Support Team'] }
 */
export declare const extractComments: (str: string) => {
    text: string;
    comments: string[];
};
/**
 * Unquotes a RFC 5322 quoted string
 *
 * @example
 * unquoteString('"Doe, John"')
 * // 'Doe, John'
 */
export declare const unquoteString: (str: string) => string;
/**
 * Parses an email address string according to RFC 5322
 *
 * Supported formats:
 * - Simple: "email@example.com"
 * - With name: "Name <email@example.com>"
 * - Quoted name: "\"Doe, John\" <email@example.com>"
 * - RFC 2047 encoded: "=?UTF-8?B?...?= <email@example.com>"
 * - With comment: "email@example.com (Display Name)"
 *
 * @example
 * parseEmailAddress('Strapi <no-reply@strapi.io>')
 * // { name: 'Strapi', email: 'no-reply@strapi.io', original: '...' }
 *
 * @example
 * parseEmailAddress('=?UTF-8?B?U3RyYXBp?= <no-reply@strapi.io>')
 * // { name: 'Strapi', email: 'no-reply@strapi.io', original: '...' }
 */
export declare const parseEmailAddress: (emailString: string | undefined | null) => ParsedEmailAddress;
/**
 * Formats an email address according to RFC 5322
 *
 * Automatically quotes names containing special characters
 * and encodes non-ASCII characters using RFC 2047.
 *
 * @example
 * formatEmailAddress('Strapi', 'no-reply@strapi.io')
 * // 'Strapi <no-reply@strapi.io>'
 *
 * @example
 * formatEmailAddress('Doe, John', 'john@example.com')
 * // '"Doe, John" <john@example.com>'
 *
 * @example
 * formatEmailAddress('Müller', 'mueller@example.com')
 * // '=?UTF-8?B?TcO8bGxlcg==?= <mueller@example.com>'
 */
export declare const formatEmailAddress: (name: string | null, email: string, options?: {
    encodeNonAscii?: boolean;
}) => string;
/**
 * Validates an email address according to RFC 5322
 *
 * @example
 * isValidEmail('user@example.com')
 * // true
 *
 * @example
 * isValidEmail('invalid')
 * // false
 */
export declare const isValidEmail: (email: string) => boolean;
/**
 * Parses multiple comma-separated email addresses
 *
 * @example
 * parseMultipleEmailAddresses('a@example.com, "Doe, John" <b@example.com>')
 * // [{ name: null, email: 'a@example.com' }, { name: 'Doe, John', email: 'b@example.com' }]
 */
export declare const parseMultipleEmailAddresses: (emailsString: string | undefined | null) => ParsedEmailAddress[];
//# sourceMappingURL=email-address.d.ts.map