1. Go to this page and download the library: Download everlutionsk/email-bundle-2 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/ */
everlutionsk / email-bundle-2 example snippets
// app/AppKernel.php
public function registerBundles()
{
return array(
// ...
new Everlution\EmailBundle\EverlutionEmailBundle()
);
}
$message = new OutboundMessage();
$message->setSubject('Subject');
$message->setText('Message text.'); // Text for basic insight in email client.
$message->setHtml('<img src="cid:logo">'); // Email body.
$message->setFromEmail('[email protected]');
$message->setFromName('Sender name');
$message->setReplyTo('[email protected]');
$message->setRecipients([
new ToRecipient('[email protected]', 'Recipient name'),
new CcRecipient('[email protected]', 'Cc recipient name'),
new BccRecipient('[email protected]', 'Bcc recipient name'),
]);
$image = new BasicAttachment('image/png', 'logo', file_get_contents('logo.png'));
$attachment = new BasicAttachment('application/pdf', 'document.pdf', file_get_contents('document.pdf'));
$message->setImages([$image]); // Images