I am trying to retrieve email using php mail but i am unable to recieve Inline images. I am able to recieve text but not recieved images.
Below is code i have tried :
<?php
$emailAddress = "domain@domian.com";
$emailPassword = "password";
$domainURL = 'domian.com';
$useHTTPS = true;
$inbox = imap_open('{'.$domainURL.':143/notls}INBOX',$emailAddress,$emailPassword) or die('Cannot connect to domain:' . imap_last_error());
$emails = imap_search($inbox,'UNSEEN');
if($emails) {
rsort($emails);
foreach($emails as $email_number) {
$overview = imap_fetch_overview($inbox,$email_number,0);
$header = imap_headerinfo($inbox, $email_number);
echo $subject_other= $overview[0]->subject;
echo $sender_name_other= $overview[0]->from;
echo $date_other=$overview[0]->date;
echo $msg_to_other=$overview[0]->to;
echo $msg_from_other = $header->from[0]->mailbox . "@" . $header->from[0]->host;
$message = imap_fetchbody($inbox, $email_number, 2);
echo $message;
}
}
imap_close($inbox);
?>
only receive text mail, cannot receive inline images how to fix it...please help me...