mathsgod/mail-bounce-parser

Installs: 11

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/mathsgod/mail-bounce-parser

1.0.2 2026-02-06 09:20 UTC

This package is auto-updated.

Last update: 2026-02-06 09:21:40 UTC


README

A PHP library for parsing email bounce messages and extracting delivery status notifications.

Features

  • Parse bounce emails in EML format
  • Extract delivery status information
  • Identify recipient addresses and bounce reasons
  • Support for standard DSN (Delivery Status Notification) format
  • Built on top of Laminas Mail component

Requirements

  • Composer

Installation

Install via Composer:

composer require mathsgod/mail-bounce-parser

Usage

Basic Example

<?php
require 'vendor/autoload.php';

// Load the bounce email content
$eml = file_get_contents('bounce.eml');

// Parse the bounce message
$report = \Mail\BounceParser::parse($eml);

// Display the parsed results
print_r($report);

Handling Results

The parser returns an array containing the delivery status information, including:

  • Recipient email addresses
  • Bounce status codes
  • Diagnostic messages
  • Action taken by the mail server
  • Original message details

License

This project is open source and available under the terms specified in the LICENSE file.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

If you encounter any issues or have questions, please open an issue on the GitHub repository.