PHP code example of openbuildings / swiftmailer-css-inliner
1. Go to this page and download the library: Download openbuildings/swiftmailer-css-inliner 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-css-inliner example snippets
use Openbuildings\Swiftmailer\CssInlinerPlugin;
$mailer = Swift_Mailer::newInstance();
$mailer->registerPlugin(new CssInlinerPlugin());
use Openbuildings\Swiftmailer\CssInlinerPlugin;
use TijsVerkoyen\CssToInlineStyles\CssToInlineStyles;
$mailer = Swift_Mailer::newInstance();
$converter = new CssToInlineStyles();
$converter->setUseInlineStylesBlock(false);
$mailer->registerPlugin(new CssInlinerPlugin($converter));