is there a way i can catch images and display them from the body of an email?
example:- if a user sends an email with a signature i want to display the signature instead of
i have attached the code im using below could someone please add to it.
[php]
–002_2985BBB6F42E324FA50FFE52D648B4DE9B7472SJFEXC001SJFCSINT Content-Type: image/png; name=“image001.png” Content-Description: image001.png Content-Disposition: inline; filename=“image001.png”; size581; creation-date=“Wed, 24 Feb 2016 12:28:15 GMT”; modification-date=“Wed, 24 Feb 2016 12:28:15 GMT” Content-ID: Content-Transfer-Encoding: base64
[/php]
[php]
// Turn off all error reporting
error_reporting(0);
$mbox = imap_open(’{mail.server:110/pop3}’, ‘user’, ‘pass’)
or die("can’t connect: " . imap_last_error());
$MC = imap_check($mbox);
$compile ="";
// count how many messages and deduct 4
$count= imap_num_msg($mbox) -3;
// Fetch an overview for all messages in INBOX
//$result = imap_fetch_overview($mbox,“1:{$MC->Nmsgs}”,0);
$result = imap_fetch_overview($mbox,$count.":{$MC->Nmsgs}",0);
foreach (array_reverse($result) as $overview) {
$messageNo = $overview->msgno;
//$date= $overview->date;
//$From = $overview->from;
$subject = $overview->subject;
//$message_id = $overview->message_id;
$body = imap_qprint(imap_body($mbox, $messageNo));
//compile to string
$compile .= "<div style='border:none;border-bottom:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p><u>".$subject."</u><br/>".$body."</div>";
}
[/php]