sbknk / php-bounce-mail-parser
Library to analyze bounced emails
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 3 360
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 5
Forks: 2
Open Issues: 0
Requires
- php: >=5.4.0
- ext-mailparse: *
- php-mime-mail-parser/php-mime-mail-parser: >=2.1
This package is not auto-updated.
Last update: 2023-03-08 11:15:33 UTC
README
How to install with Composer
To install this library, run the command below and you will get the latest version
composer require sbknk/php-bounce-mail-parser
How to use it
<?php // Initialize compser autoloader require_once __DIR__ . '/vendor/autoload.php'; $parser = new \PhpBounceMailParser\Parser(); // You can specify a directory $parser->parseDirectory('path/to/directory'); // or a single file (e.g. *.eml) $parser->parseFile('path/to/file'); // Specify emails to be ignored when trying to find the recipient as follows $parser->ignoreEmail('no-reply@wf-ingbau.de'); // Finally get the data output directly in the browser $parser->outputCsv(); // or as file download $parser->saveCsvAs(); // Here is a complete working example $parser = new \PhpBounceMailParser\Parser(); $parser->ignoreEmail('foo@bar.com') ->parseDirectory(__DIR__ . '/resources') ->outputCsv(); ?>