PHP code example of golded-dev / laravel-ftn-squish
1. Go to this page and download the library: Download golded-dev/laravel-ftn-squish 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/ */
golded-dev / laravel-ftn-squish example snippets
declare(strict_types=1);
use Golded\Ftn\Squish\SquishReader;
$reader = new SquishReader();
foreach ($reader->read('/path/to/messages/SQUISH/STEST1') as $message) {
echo $message->msgno.PHP_EOL;
echo $message->fromName.' -> '.$message->toName.PHP_EOL;
echo $message->subject.PHP_EOL;
echo $message->bodyText.PHP_EOL;
}
use Golded\Ftn\ReaderOptions;
use Golded\Ftn\Squish\SquishReader;
$messages = new SquishReader()->read(
path: '/path/to/messages/SQUISH/NETMAIL',
options: new ReaderOptions(fallbackCharset: 'CP437'),
);