PHP code example of phlib / mail
1. Go to this page and download the library: Download phlib/mail 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/ */
phlib / mail example snippets
/** @var Phlib\Mail\Mail $email **/
$email->getSubject();
$email->hasHeader('X-Header-Name');
$email->setReturnPath('[email protected]');
// raw email
$email->toString();
php
use Phlib\Mail;
// from string
$email = (new Factory)->createFromString('... raw email');
// from file
$email = (new Factory)->createFromFile('/path/to/file.eml');