PHP code example of udarajay / mep
1. Go to this page and download the library: Download udarajay/mep library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
udarajay / mep example snippets
use UJ\MEP\EmailParser;
// Init by passing in a raw email as a string
$parser = EmailParser::parse($raw);
// Access un-parsed parts
$parser->getRaw();
$parser->getBody();
$parser->getHeaders();
// Parsed header content
$parser->getMessageId();
$parser->getFrom();
$parser->getTo();
$parser->getSubject();
$parser->getDeliveredTo();
$parser->getContentType();
$parser->getContentLanguage();
$parser->getMimeVersion();
// Parsed fragments (Message parts)
$fragments = $parser->getFragments();