PHP 8.2.30
Preview: errors.js Size: 1.77 KB
/proc/thread-self/root/home/byroehnu/.trash/node_modules11/nodemailer/lib/errors.js

'use strict';

/**
 * Nodemailer Error Codes
 *
 * Centralized error code definitions for consistent error handling.
 *
 * Usage:
 *   const errors = require('./errors');
 *   let err = new Error('Connection closed');
 *   err.code = errors.ECONNECTION;
 */

/**
 * Error code descriptions for documentation and debugging
 */
const ERROR_CODES = {
    // Connection errors
    ECONNECTION: 'Connection closed unexpectedly',
    ETIMEDOUT: 'Connection or operation timed out',
    ESOCKET: 'Socket-level error',
    EDNS: 'DNS resolution failed',

    // TLS/Security errors
    ETLS: 'TLS handshake or STARTTLS failed',
    EREQUIRETLS: 'REQUIRETLS not supported by server (RFC 8689)',

    // Protocol errors
    EPROTOCOL: 'Invalid SMTP server response',
    EENVELOPE: 'Invalid mail envelope (sender or recipients)',
    EMESSAGE: 'Message delivery error',
    ESTREAM: 'Stream processing error',

    // Authentication errors
    EAUTH: 'Authentication failed',
    ENOAUTH: 'Authentication credentials not provided',
    EOAUTH2: 'OAuth2 token generation or refresh error',

    // Resource errors
    EMAXLIMIT: 'Pool resource limit reached (max messages per connection)',

    // Transport-specific errors
    ESENDMAIL: 'Sendmail command error',
    ESES: 'AWS SES transport error',

    // Configuration and access errors
    ECONFIG: 'Invalid configuration',
    EPROXY: 'Proxy connection error',
    EFILEACCESS: 'File access rejected (disableFileAccess is set)',
    EURLACCESS: 'URL access rejected (disableUrlAccess is set)',
    EFETCH: 'HTTP fetch error'
};

// Export error codes as string constants and the full definitions object
module.exports = Object.keys(ERROR_CODES).reduce(
    (exports, code) => {
        exports[code] = code;
        return exports;
    },
    { ERROR_CODES }
);

Directory Contents

Dirs: 20 × Files: 2

Name Size Perms Modified Actions
- drwxr-xr-x 2026-02-21 00:53:40
Edit Download
base64 DIR
- drwxr-xr-x 2026-02-21 00:53:40
Edit Download
dkim DIR
- drwxr-xr-x 2026-02-21 00:54:00
Edit Download
fetch DIR
- drwxr-xr-x 2026-02-21 00:53:44
Edit Download
- drwxr-xr-x 2026-02-21 00:53:44
Edit Download
- drwxr-xr-x 2026-02-21 00:53:46
Edit Download
mailer DIR
- drwxr-xr-x 2026-02-21 00:54:00
Edit Download
- drwxr-xr-x 2026-02-21 00:54:00
Edit Download
mime-node DIR
- drwxr-xr-x 2026-02-21 00:54:00
Edit Download
punycode DIR
- drwxr-xr-x 2026-02-21 00:53:50
Edit Download
qp DIR
- drwxr-xr-x 2026-02-21 00:53:50
Edit Download
- drwxr-xr-x 2026-02-21 00:53:52
Edit Download
- drwxr-xr-x 2026-02-21 00:53:54
Edit Download
shared DIR
- drwxr-xr-x 2026-02-21 00:53:54
Edit Download
- drwxr-xr-x 2026-02-21 00:53:56
Edit Download
smtp-pool DIR
- drwxr-xr-x 2026-02-21 00:54:00
Edit Download
- drwxr-xr-x 2026-02-21 00:53:58
Edit Download
- drwxr-xr-x 2026-02-21 00:53:58
Edit Download
- drwxr-xr-x 2026-02-21 00:54:02
Edit Download
xoauth2 DIR
- drwxr-xr-x 2026-02-21 00:53:58
Edit Download
1.77 KB lrw-r--r-- 2026-02-21 00:53:36
Edit Download
4.85 KB lrw-r--r-- 2026-02-21 00:54:00
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).