email client - getting email from the server
Posted: Thu Aug 05, 2010 4:22 pm
Hi
I was just wondering if anyone could tell me what is wrong with this code. For a web application I want to connect to my email supplier with whom I have an account. I am trying to make a basic connection using imap, to simply test this is possible. I have looked around and have been unable to find sources that would help me, as I understand it, this particular method should be working.
I was just wondering if anyone could tell me what is wrong with this code. For a web application I want to connect to my email supplier with whom I have an account. I am trying to make a basic connection using imap, to simply test this is possible. I have looked around and have been unable to find sources that would help me, as I understand it, this particular method should be working.
Code: Select all
<?php
//Open an IMAP connection
$user = "##";
$password = "##";
$ms = imap_open("{mail.yahoo.com}INBOX", $user, $password);
$message = imap_num_msg($ms);
echo "<p> User $user has $message in his inbox.</p>";
?>