1. Go to this page and download the library: Download grizzlylab/mailer-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/ */
grizzlylab / mailer-bundle example snippets
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
//...
new Grizzlylab\Bundle\MailerBundle\GrizzlylabMailerBundle()
//...
//send($content, $addresses, $subject = null, array $templateParameters = [], $contentIsATemplate = true, array $sender = null)
//If the content is a template and if the subject is null, we use the first line of the template as the subject && the rest as the body
// for a single recipient, second arguement is a string (e.g. '[email protected]')
$this->container->get('grizzlylab_mailer')->send($content, $address);
// for multiple recipients, second arguement is an array
$this->container->get('grizzlylab_mailer')->send($content, $addresses);
// you can override the sender
$sender = ['address' => [email protected], 'name' => 'GrizzlyLab'];
$this->container->get('grizzlylab_mailer')->send($content, $addresses, $sender);
// the return value is the number of recipients who were accepted for delivery
$numberOfAcceptedRecipients = $this->container->get('grizzlylab_mailer')->send($content, $addresses, $sender);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.