jeremymarc / email-forward-parser
Parse forwarded email
Installs: 73
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/jeremymarc/email-forward-parser
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2025-09-23 11:02:20 UTC
README
This is a small PHP library to parse forwarded email content, inspired by EmailReplyParser.
Installation
If you don't use a ClassLoader in your application, just require the provided autoloader:
<?php require_once 'src/autoload.php';
Usage
Simply call the read method with the email content like this:
<?php $email = EmailForwardParser::read($body); $from = $email->getFrom(); $to = $email->getTo(); $fromName = $from['name']; $fromEmail = $from['email']; $toName = $to['name']; $toEmail = $to['email']; $date = $email->getDate(); //DateTime $subject = $email->getSubject(); $body = $email->getBody();