The code below outputs incorrect html and insert some junk chars in between. I think the solution will be base conversion. But I can't figure out which base.

```
<?php
$hostname = '{imap.gmail.com:993/imap/ssl}[Gmail]/Sent Mail';
$username = '...@gmail.com';
$password = '*****';
$sent = imap_open($hostname, $username, $password) or die('Cannot connect to Gmail: ' . imap_last_error());
$emails   = imap_search($sent, 'SUBJECT "Part"');

if ($emails)
{
    foreach ($emails as $email_number)
    {
        $message = imap_body($sent, $email_number,1.2);
        echo $message;
    }
}
imap_close($sent);

?>

```

**OUTPUT HTML**

```
<td colspan="3D&quot;2&quot;" 
st="yle=3D&quot;
border-color:rgb(204,204,20=" 4);
border-width:0px="" 0px="" 1px="" 1px;
font-family:ari="al;
color:rgb(255,255,255);
background-color:rgb(123,186,0=" );
text-align:center;
width:100px"="">

```