PHP code example of scottrobertson / premailer

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

    

scottrobertson / premailer example snippets




ailer = new ScottRobertson\Premailer\Request();

// Convert our HTML email using Premailer
$response = $premailer->convert('<h1>Hi</h1>');

// Download the generated HTML file from Premailer
echo $response->downloadHtml();