PHP code example of gerardojbaez / mailbodyparser
1. Go to this page and download the library: Download gerardojbaez/mailbodyparser 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/ */
gerardojbaez / mailbodyparser example snippets
use Gerardojbaez\MailBodyParser\Parsers\ForwardParser;
$forwardParser = new ForwardParser();
/** @var Gerardojbaez\MailBodyParser\Forward $forward **/
$forward = $forwardParser->parse($bodyContent);
$forward->getFromName(); // Jane Doe
$forward->getFromEmail(); // [email protected]
$forward->getToName(); // Jim Doe
$forward->getToEmail(); // [email protected]
$forward->getSubject(); // E-mail subject