Skip to content

jeremymarc/EmailForwardParser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EmailForwardParser

Build Status

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();

About

PHP Library to parse the content of a forwarded email

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages