Using pop3 from php
Hi,
I am trying to access mails on my gmail account
through pop3 in php.
but it doesn't seem to work.
Below is my code and the output I get after
executing it:
So only question is how to make it work.
code ->
\n";
} else {
foreach ($folders as $val) {
echo $val . "
\n";
}
}
echo "Headers in INBOX\n";
$headers = imap_headers($mbox);
if ($headers == false) {
echo "Call failed
\n";
} else {
foreach ($headers as $val) {
echo $val . "
\n";
}
}
imap_close($mbox);
?>
output ->
Warning:
imap_open() [function.imap-open]: Couldn't open stream {pop.gmail.com:995/pop3/ssl} in pop3.php on line 4
reached here
Mailboxes
Warning: imap_listmailbox(): supplied argument is not a valid imap resource in pop3.php on line 7
Call failed
Headers in INBOX
Warning: imap_headers(): supplied argument is not a valid imap resource in pop3.php on line 18
Call failed
Warning: imap_close(): supplied argument is not a valid imap resource in pop3.php on line 28