1. Go to this page and download the library: Download rollerworks/mail-bundle 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/ */
rollerworks / mail-bundle example snippets
// in AppKernel::registerBundles()
$bundles = array(
// ...
new Rollerworks\Bundle\MailBundle\RollerworksMailBundle(),
// ...
);
// in AppKernel::registerBundles()
$bundles = array(
// ...
new Rollerworks\Bundle\MailBundle\RollerworksMailBundle(),
// ...
);
php
// in AppKernel::registerBundles()
$bundles = array(
// ...
new Rollerworks\Bundle\MailBundle\RollerworksMailBundle(),
// ...
);
php
// Replacements must be an array or implementation of \Swift_Plugins_Decorator_Replacements
// Each key is an e-mail address and the value an array that is directly passed to render() of the templating engine.
$replacements = array(
"[email protected]" => array("a" => "b", "c" => "d"),
"[email protected]" => array("a" => "x", "c" => "y")
);
// Template filename follows the Symfony template resolving convention ([Bundle]:[Dir]:[filename].[type].[ext]).
$templates = array(
'html' => 'AcmeHelloBundle:Email:Order.html.twig',
'text' => 'AcmeHelloBundle:Email:Order.txt.twig'
);
$templating = $container->get('templating');
$decorator = new \Rollerworks\Bundle\MailBundle\Decorator\TemplateDecorator($templating, $replacements, $templates);
$mailer->registerPlugin($decorator);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.