PHP code example of consultiait / mailer-interface
1. Go to this page and download the library: Download consultiait/mailer-interface 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/ */
consultiait / mailer-interface example snippets
new Mailer\MailerBundle\MailerBundle(),
$message = new Message();
$message->setFrom('[email protected]');
$message->setSubject('Test');
$message->addTo('[email protected]');
$message->addContent('<b>Test value</b>', Content::HTML);
$message->addAttachment('test.txt', 'text/plain', base64_encode('test'));
echo $this->getContainer()->get('consultia_mailer.provider')->send($message);