jQuery-Youtube-Channels-Playlist
jQuery-Youtube-Channels-Playlist copied to clipboard
IMAP Mailbox With File Attachments using PHP Imap Class
https://www.youtube.com/watch?v=xFQxTB0awiU
i did everything but as per source code am not getting any of the mail only getting attached files not each
my full code
connect('{imap.gmail.com:993/imap/ssl}INBOX', '[email protected]', 'xxxxxx')) { $inbox = $email->getMessages('html'); } //Array of messages ?>email Inbox[email protected]
<?php
if($inbox==null){
echo'<h4>Not Connected...</h4>';
exit;
}else
{
?>
<table id="inbox" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th>No</th>
<th>Subject</th>
<th>Name</th>
<th>Email</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<?php
$html='';
$no= 1;
foreach($inbox as $v);
{
$attachment='';
if(!empty($v=['attachments'])){
foreach($v=['attachments'] as $a){
$attachment.='<br><a href="'.$a.'" target="_BLANK">' .end(explode('/',$a)).'</a>';
}
}
$html.='<tr><td>'.$no.'</td>';
$html.='<td><a href="#" data-message="'.htmlentities($v['message'].(!empty($attachment) ? '<hr>Attechments:'.$attachment:'')).'" class="message" data-toggle="modal" data-target="#addModal">' .substr($v['subject'],0,120).'</a></td>';
$html.='<td>'.(empty($v['from']['name'])? '[empty]': $v['from']['name']).'</td>';
$hmtl.='<td><a href="mailto:'.$v['from']['address'].'?subject=Re:'.$v['subject'].'">'.$v['from']['address'].'</a></td>';
$hmtl.='<td>'.date('Y-m-d h:i:sa',$v['$date']).'</td></tr>';
$no++;
}
echo $html;
?>
</tbody>
</table>
<?php
}
?>
</div>
</div>