PHP code example of gorilladash / outlook-formatter

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

    

gorilladash / outlook-formatter example snippets


    use OutlookFormatter;
    
    $html = ''; // your html
    $result = OutlookFormatter::format($html);


    use GorillaDash\OutlookFormatter\Formatter;
    
    $formatter = new Formatter(800); // First argument is max width for container;
    $formatter->setAutoCenter(['table' => true, 'image' => true]); // Set all table/td/image to be center, default is false
    
    $html = ''; // your html
    $result = $formatter->format($html);