为什么在代码imap_body或imap_fetchbody时出错并尝试在php中保存附件

This is my PHP code:

<?php
$host = 'xxxxx.com';
$username = 'xxxxx@ies-nusantara.com';
$password = 'xxxxxx';

/* try to connect */
$inbox = imap_open("{".$host."/pop3/novalidate-   cert}INBOX",$username,$password) or die('Cannot connect to sERVER: ' . imap_last_error());
$emails = imap_search($inbox,'ALL');
if($emails)
{
    /* begin output var */
    $output = '';

    /* put the newest emails on top */
    rsort($emails);

    /* for every email... */
    foreach($emails as $email_number)
    {
        /* get information specific to this email */
        $overview = imap_fetch_overview($inbox,$email_number,0);
        /* output the email header information */
        $output.= '<div class="toggler '.($overview[0]->seen ? 'read' : 'unread').'">';
        $output.= '<span class="subject">'.$overview[0]->subject.'</span> ';
        $output.= '<span class="from">'.$overview[0]->from.'</span>';
        $output.= '<span class="date">on '.$overview[0]->date.'</span>';
        $output.= '</div>';
        $body = imap_fetchbody($overview[0]->msgno,1.2);
        $output.= '<div class="body">'.$body.'</div>';
    }

    echo $output;
}

How to read body email and save attachment email, i tried use function imap_fetchbody but error..

Please help me.