Why doesn't this PHP code to read number of messages in Inbox work?

aishkterry1

New Member
It works on XAMPP but not on the host that serves my website (linux server). I do not see any error messages and the script just times out.\[code\]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> <title>Email Parser</title></head><body><?phpecho "Hello World";$hostname = '{imap.gmail.com:993/imap/ssl}Inbox';$username = '[email protected]'; //Replaced with actual user name and $password = 'abc'; //password in the script$mbox = imap_open($hostname, $username, $password) or die("can't connect: " . imap_last_error());echo "+++++ <br>";$MC = imap_check($mbox);echo "***** <br>";echo $MC->Nmsgs;?></body></html>\[/code\]
 
Back
Top