PHP code example of h4kuna / mail-manager

1. Go to this page and download the library: Download h4kuna/mail-manager 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/ */

    

h4kuna / mail-manager example snippets


$message = $mailer->createMessage('body', ['foo' => $foo, 'bar' => $bar]);

// if you have body.latte (for html) and body-plain.latte (for plain text) in same directory, then is used. And bind variables onetime.

$mailer->send($message);

/* @var $mailer h4kuna\MailManager\MailManager */
$message = $mailer->createMessage('test-file', ['foo' => 'bar'])
           ->addTo('Milan Matejcek <[email protected]>');
/* @var $message Nette\Mail\Message */
$message->addBcc('[email protected]'); // avaible is 'mail' or 'name <mail>'
$mailer->send($message); // if anything bad throw exception