1. Go to this page and download the library: Download anper/mailer 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/ */
anper / mailer example snippets
use Anper\Mailer\Transport\NullTransport;
use Anper\Mailer\Storage\MemoryStorage
use Anper\Mailer\Mailer;
$storage = new MemoryStorage([
'hello' => [
'subject' => 'Hello',
'body' => 'Hello World!',
'from' => '[email protected]',
'to' => '[email protected]',
],
]);
$mailer = new Mailer(new NullTransport(), $storage);
$mailer->send('hello');
// or you can modify message
$mailer->get('hello')
->addTo('[email protected]')
->send();