Skip to content

Commit c9a1a2f

Browse files
committed
initial port
0 parents  commit c9a1a2f

File tree

238 files changed

+5628
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

238 files changed

+5628
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/vendor/
2+
.idea

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Email Forward Parser
2+
3+
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).
4+
5+
All credit goes to them.
6+
7+
## Installation
8+
9+
```bash
10+
composer require stechstudio/email-forward-parser
11+
```
12+
13+
## Usage
14+
15+
```php
16+
use STS\EmailForward\Parser;
17+
18+
$parser = new Parser();
19+
20+
$result = $parser->read($emailBody, $emailSubject);
21+
22+
echo $result['forwarded']; // true
23+
echo $result['email']['from']['address']; // [email protected]
24+
```
25+
26+
See https://github.com/crisp-oss/email-forward-parser/blob/master/README.md for more usage examples.
27+
28+
## License
29+
30+
MIT

composer.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "stechstudio/email-forward-parser",
3+
"description": "PHP port of https://github.com/crisp-oss/email-forward-parser",
4+
"type": "library",
5+
"require": {
6+
"php": "^8.3"
7+
},
8+
"require-dev": {
9+
"phpunit/phpunit": "^11.5",
10+
"symfony/var-dumper": "^7.2"
11+
},
12+
"license": "MIT",
13+
"autoload": {
14+
"psr-4": {
15+
"STS\\EmailForward\\": "src/"
16+
}
17+
},
18+
"authors": [
19+
{
20+
"name": "Joseph Szobody",
21+
"email": "[email protected]"
22+
}
23+
]
24+
}

0 commit comments

Comments
 (0)