composer require compolomus/kmail
use Compolomus\Kmail;
$test = new KMail('Test text');
$test
->addAdress('[email protected]')
->addAdress('[email protected]')
->addFile('class.php', file_get_contents(__FILE__))
->setSubject('Test mail')
->send();
$test->debug();