Hello All
I am creating a email reader.
I have developed some code which will show headers of the mail and when i click on those header that should bring me to the email body part so that i can read that corresponding mail.
Problem:-
As of now am getting headers of my mails(without link to body of that mail) in mailbox but am not getting any clue how to read those mail which is my requirement....here's my code
<?php
$mbox= imap_open("{pop.gmail.com:995/pop3/ssl}INBOX", "example@gmail.com", "pw")or die("can't connect: " . imap_last_error());
print_r(imap_errors());
echo "<h1> Mailboxes </h1>\n";
//$folders = imap_listmailbox($mbox, "{pop.gmail.com:995}", "");
$folders = imap_listmailbox($mbox, "{pop.gmail.com:995}", "");
print_r($folders);
if ($folders == false) {
echo "No Folders Found<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);
?>
Plz anyone give some idea how to go forward>>>