1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
|
<?php
$inbox = imap_open("{mail.anbieter.com:143}", "mail@anbieter.com", "passwort");
$outbox = imap_open("{mail.anbieter.com:143}", "mail@anbieter.com", "passwort");
$total = imap_num_msg($inbox); // Anzahl der Nachrichten
for ($i=1; $i<=$total; $i++){
$header = imap_header($inbox, $i);
$mail_date = $header->date;
$mail_subject = $header->subject;
$mail_fromaddress = $header->fromaddress;
$mail_fromaddress = iconv_mime_decode("$mail_fromaddress", 0, "ISO-8859-1"); // MIME Decode
echo "Betreff: $mail_subject | ";
echo "Datum:</strong> $mail_date | ";
echo "Von:</strong> $mail_fromaddress | ";
echo "<br><hr><br>";
}
?>
|