leon-for-nix / my-mailer
There is no license information available for the latest version (v1.0.0) of this package.
My mailer version
v1.0.0
2021-08-05 19:15 UTC
Requires
- monolog/monolog: ^2.3
- swiftmailer/swiftmailer: ^6.0
This package is auto-updated.
Last update: 2024-04-06 01:07:31 UTC
README
<?php use App\Transport\MailTransport; $config = [ 'smtp'=>'smtp.gmail.com', 'port' => 465, 'encryption'=>'ssl', 'pathTemplates'=> '/templates/', 'defaultTemplate'=> '/templates/default.php', 'username'=>'user', 'email'=>'info@gmail.com', 'password'=> 'pass', ]; $pathLog = '/logs/log.log'; $transport = new MailTransport($config); $transport->setLogs($pathLog, 'user'); $params = [ 'shopName' => "Apple Shop", 'item' => "2718", ]; $title = "Your purchase"; $transport->send('order', 'info@gmail.com', 'user', $title, $params);
Default template
<div style="padding: 20px;"> <?= $body?> </div>
Regular template
<h2>In the online store "<?=$shopName?>" you ordered a product №<?=$item?>!</h2> <p>Thanks, Online store "<?=$shopName?>"<p>