https://github.com/mablae/php-bounce-mail-parser
PHP library to analyze bounced emails.
https://github.com/mablae/php-bounce-mail-parser
Last synced: about 1 year ago
JSON representation
PHP library to analyze bounced emails.
- Host: GitHub
- URL: https://github.com/mablae/php-bounce-mail-parser
- Owner: mablae
- Created: 2016-07-31T23:14:45.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-14T14:58:49.000Z (over 10 years ago)
- Last Synced: 2025-02-10T14:08:55.279Z (over 1 year ago)
- Language: PHP
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bounce email parser
## How to install with [Composer](https://getcomposer.org/)
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
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();
?>
```