thomas2312
New member
Hallo!
Ich möchte ein PHP-Script, welches nur die neu angekommenen Mails ausgibt!
Jedoch werden immer Alle ausgegeben! Das Script kann die für die neu angekommenen die Anzahl nicht berechen!
Ich bitte um eure Mithilfe!
Lg Thomas
Ich möchte ein PHP-Script, welches nur die neu angekommenen Mails ausgibt!
Jedoch werden immer Alle ausgegeben! Das Script kann die für die neu angekommenen die Anzahl nicht berechen!
Ich bitte um eure Mithilfe!
PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
<title>POP3 Zugriff</title>
</head>
<?php
$mailbox= imap_open("{mail.edis.at/novalidate-cert}INBOX", "thomas@thomas.at", "thomas")
or die("can't connect: " . imap_last_error());
$recent=imap_num_recent($mailbox);
$count=imap_num_msg($mailbox);
for($count-$recent; $i<=$count; $i++)
{
$header = imap_header($mailbox, $i);
$betreff = $header->subject;
echo "$betreff";
echo "<br>";
imap_setflag_full($mailbox, $i, "\\seen");
}
imap_close($mailbox);
?>
<body>
</body>
</html>
Lg Thomas