1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
<html>
<head><title>Mail Bounce</title></head>
<body>
<table><tr><td>
<?php
$host='{****@***.be:110/pop3/notls}';
$user='mailerdaemon@***.be';
$pass='*********';
$from='mailerdaemon@***.be';
$mail=@imap_open($host,$user,$pass) or die("Can't connect: " . imap_last_error());
if($_REQUEST['see']) {
$number=$_REQUEST['see'];
echo "<pre>";
echo imap_body($mail,$number);
echo "</pre><p>\n\n";
echo "<a href='javascript:history.back()'>Back</a>";
}
$mails=imap_num_msg($mail);
echo "<b>" . $from . "</b> : ";
if($mails==0){
echo "<i>no mails.</i>";
}
else
{
echo "$mails mails<p>";
for($i=1;$i<=$mails;$i++){
$chead=imap_headerinfo($mail,$i);
echo $chead->Unseen;
echo "<br>";
if ($chead->Unseen == ' '){
print_r($chead);
// printf($header-> Unseen);
// echo strtotime($header->date);
// if ($chead-> Unseen == ' ' ){
$chead->Unseen = 'U';
$mid=ltrim($chead->Msgno);
echo "<a href='bounceMail.php?see=$mid'>";
echo $chead->subject;
echo "</a>";
echo "<br><br><br>\n";
echo $chead->Unseen;
echo "<br><br><br>\n";
//}
}
}
}
// }
// }
echo "<p><a href='bounceMail.php?create=new'>New mail</a><p>";
//insert
// define('DB_NAME', 'mail');
// define('DB_USER', 'root');
// define('DB_PASSWORD', '');
// define('DB_HOST', 'localhost');
// if(isset($mail, $link){
// $link = mysql_connect( DB_HOST , DB_USER , DB_PASSWORD );
// mysql_select_db( DB_NAME , $link );
// mysql_query( 'INSERT INTO error_mail (email, link) VALUES ('".$mail."', '".$link."'))';
// }
// else{
// imap_delete($mail, $mid);
// }
imap_close($mail, CL_EXPUNGE);
?>
</tr></td></table>
</body>
</html> |
Partager