PHP code example of openbuildings / swiftmailer-filter

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

    

openbuildings / swiftmailer-filter example snippets


$mailer = Swift_Mailer::newInstance();

$mailer->registerPLugin(new FilterPlugin([
    new WhiteListFilter(['example.com']),
    new BlacklistFilter(['[email protected], [email protected]'])
]));