Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <table class="table table-striped table-hover" width="400" >
- <tbody >
- <tr class="warning">
- <td class="inbox-small-cells">
- <input type="checkbox" class="mail-checkbox">
- </td>
- <td ><i class="fa fa-star"></i></td>
- <td >#</td>
- <td >Sender</td>
- <td >Subject</td>
- <td ><i class="fa fa-paperclip"></i></td>
- <td >Date</td>
- <td >Message</td>
- <?php
- $hostname='{imap.gmail.com:993/imap/ssl}INBOX';
- $username = 'mymail@mail.com';
- $password = 'password';
- $inbox = imap_open($hostname,$username,$password) or die('Cannot connect to Tiriyo: ' . 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);
- $message = imap_fetchbody($inbox,$email_number, 1, FT_PEEK);
- $email_number;
- $overview[0]->subject;
- $overview[0]->from;
- $overview[0]->date;
- $overview[0]->size ;
- ?>
- <tr class="text-info" >
- <td class="inbox-small-cells" >
- <input type="checkbox" class="mail-checkbox">
- </td>
- <td ><i class="fa fa-star"></i></td>
- <td> <?php echo $email_number; ?></td>
- <td ><?php echo $overview[0]->from;?></a></td>
- <td><?php echo $overview[0]->subject; ?></td>
- <td class="view-message inbox-small-cells"><i class="fa fa-paperclip"></i></td>
- <td ><?php echo $overview[0]->date; ?> </td>
- </tr>
- <?Php
- }
- }
- ?>
Add Comment
Please, Sign In to add comment