PHP code example of prezent / ink-bundle

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

    

prezent / ink-bundle example snippets


namespace AppBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller

class AppController extends Controller
{
    public function emailAction()
    {
        $message = $this->get('prezent_ink.factory')->getMessage('AppBundle:Mail:hello.eml.twig', [
            'user' => $this->getUser(),
        ]);

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

        $this->get('mailer')->send($message);
    }
}