PHP code example of sfcod / email-engine

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

    

sfcod / email-engine example snippets


use SfCod\EmailEngineBundle\Mailer\Mailer;
use SfCod\EmailEngineBundle\Example\TestOptions;
use SfCod\EmailEngineBundle\Example\TestTemplate;

public function indexAction(Mailer $mailer) {
    $options = new TestOptions('some message', 'attachment_path');
    $template = new TestTemplate($options);
    $mailer->send($template, '[email protected]');
}