okey, Found a way with imap_open
used script:
set_time_limit (120);
//$mbox = imap_open("{mail.google.com:143}", "raimon", "pass");
$mbox = imap_open ("{imap.gmail.com:993/imap/ssl}INBOX", "raimisy", "LoL")
or die("can't connect: " . imap_last_error());
echo "<h1>Mailboxes</h1>\n";
$folders = imap_listmailbox($mbox, "{imap.gmail.com:993/imap/ssl}INBOX", "*");
if ($folders == false) {
echo "Call failed<br />\n";
} else {
foreach ($folders as $val) {
echo $val . "<br />\n";
}
}
echo "<h1>Headers in INBOX</h1>\n";
$headers = imap_headers($mbox);
if ($headers == false) {
echo "Call failed<br />\n";
} else {
foreach ($headers as $val) {
echo $val . "<br />\n";
}
}
imap_close($mbox);
But it just reads the title of all emails,
how can I actually get the content ?
edit: edited password