PHP code example of illarra / email-bundle

1. Go to this page and download the library: Download illarra/email-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/ */

    

illarra / email-bundle example snippets


$message = \Swift_Message::newInstance();

$this->get('illarra.email.renderer')->updateMessage(
    $message,
    'AcmeEmailBundle:Email:layout.html.twig',
    'AcmeEmailBundle:Email:signup/eu.html.twig',
    '@AcmeEmailBundle/Resources/assets/css/email.css',
    [
        'name' => 'Bartolo',
    ]
);

$message->setTo(['[email protected]' => 'Bartolo']);

$this->get('illarra.email.mailer')->send('maritxu', $message);

$renderer->updateMessage($swift_message, $layout, $template, $css, $data);

$mailer->send($profile, $swift_message);