PHP IMAP: Fetching just the body of Email 
<p>If I send just with some Body text, my utility works fine but if I get email with attachment then it reads the attachment file too and shows weird characters too.</p>

<pre><code>$overview = imap_fetch_overview($inbox,$email_number,0);

$message = imap_fetchbody($inbox,$email_number,2);

$structure = imap_fetchstructure($inbox, $email_number); 
</code></pre>

<p>I am gonna use $structure to save attachment separately.</p>
