Skip to content

Commit

Permalink
initial port
Browse files Browse the repository at this point in the history
  • Loading branch information
jszobody committed Jan 24, 2025
0 parents commit c9a1a2f
Show file tree
Hide file tree
Showing 238 changed files with 5,628 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/vendor/
.idea
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Email Forward Parser

This is a PHP port of [email-forward-parser](https://github.com/crisp-oss/email-forward-parser) by [Crisp OSS](https://github.com/crisp-oss).

All credit goes to them.

## Installation

```bash
composer require stechstudio/email-forward-parser
```

## Usage

```php
use STS\EmailForward\Parser;

$parser = new Parser();

$result = $parser->read($emailBody, $emailSubject);

echo $result['forwarded']; // true
echo $result['email']['from']['address']; // [email protected]
```

See https://github.com/crisp-oss/email-forward-parser/blob/master/README.md for more usage examples.

## License

MIT
24 changes: 24 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "stechstudio/email-forward-parser",
"description": "PHP port of https://github.com/crisp-oss/email-forward-parser",
"type": "library",
"require": {
"php": "^8.3"
},
"require-dev": {
"phpunit/phpunit": "^11.5",
"symfony/var-dumper": "^7.2"
},
"license": "MIT",
"autoload": {
"psr-4": {
"STS\\EmailForward\\": "src/"
}
},
"authors": [
{
"name": "Joseph Szobody",
"email": "[email protected]"
}
]
}
Loading

0 comments on commit c9a1a2f

Please sign in to comment.