PHP code example of mathsgod / mht2html

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

    

mathsgod / mht2html example snippets


use Mht2Html\Converter;

$converter = new Converter();
$html = $converter->convertFile('/path/to/email.mht');

file_put_contents('output.html', $html);

use Mht2Html\Converter;

$converter = new Converter();
$mht = file_get_contents('/path/to/email.mht');
$html = $converter->convertString($mht);