smarcus3 Posted April 9, 2012 Author Share Posted April 9, 2012 Here is the working code $mbox = imap_open ("{imap.gmail.com:993/imap/ssl}INBOX", "********@gmail.com","********", OP_READONLY) or die ("can't connect: " . imap_last_error()); $status = imap_status($mbox, "{imap.gmail.com}INBOX", SA_ALL); if ($status) { echo "Messages: " . $status->messages . "<br />\n"; echo "Recent: " . $status->recent . "<br />\n"; echo "Unseen: " . $status->unseen . "<br />\n"; echo "UIDnext: " . $status->uidnext . "<br />\n"; echo "UIDvalidity:" . $status->uidvalidity . "<br />\n"; } else { echo "imap_status failed: " . imap_last_error() . "\n"; } [/Code] Link to comment https://forums.phpfreaks.com/topic/260596-unread-messages-gmail/page/2/#findComment-1335812 Share on other sites More sharing options...
smarcus3 Posted April 9, 2012 Author Share Posted April 9, 2012 thanks drco2 just figured it out. Thanks all for all the help. Using a server such as x10 which allows 993 connections is definetly key. I hope this thread can help someone else now. This server is also free. Link to comment https://forums.phpfreaks.com/topic/260596-unread-messages-gmail/page/2/#findComment-1335813 Share on other sites More sharing options...
smarcus3 Posted April 9, 2012 Author Share Posted April 9, 2012 Also if someone wants to see the output please use this link. http://smarcus3.x10.mx/ Here is the complete index.php code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="description" content="" /> <meta name="keywords" content="" /> <meta name="author" content="" /> <link rel="stylesheet" type="text/css" href="style.css" media="screen" /> <title></title> </head> <body> <?php $mbox = imap_open ("{imap.gmail.com:993/imap/ssl}INBOX", "[email protected]","xxx", OP_READONLY) or die ("can't connect: " . imap_last_error()); $status = imap_status($mbox, "{imap.gmail.com}INBOX", SA_ALL); if ($status) { echo "Messages: " . $status->messages . "<br />\n"; echo "Recent: " . $status->recent . "<br />\n"; echo "Unseen: " . $status->unseen . "<br />\n"; echo "UIDnext: " . $status->uidnext . "<br />\n"; echo "UIDvalidity:" . $status->uidvalidity . "<br />\n"; } else { echo "imap_status failed: " . imap_last_error() . "\n"; } ?> </body> </html> [/Code] EDIT (KP) Removed credz Link to comment https://forums.phpfreaks.com/topic/260596-unread-messages-gmail/page/2/#findComment-1335814 Share on other sites More sharing options...
dcro2 Posted April 9, 2012 Share Posted April 9, 2012 I would change my email password if I were you. Link to comment https://forums.phpfreaks.com/topic/260596-unread-messages-gmail/page/2/#findComment-1335817 Share on other sites More sharing options...
smarcus3 Posted April 9, 2012 Author Share Posted April 9, 2012 Ill do that now. Thanks. I've been careful to delete my pass every time but of course on the last post i mess up. Link to comment https://forums.phpfreaks.com/topic/260596-unread-messages-gmail/page/2/#findComment-1335818 Share on other sites More sharing options...
smarcus3 Posted April 9, 2012 Author Share Posted April 9, 2012 Thanks to whatever admin removed my credentials. Link to comment https://forums.phpfreaks.com/topic/260596-unread-messages-gmail/page/2/#findComment-1335835 Share on other sites More sharing options...
Andy-H Posted April 9, 2012 Share Posted April 9, 2012 Ill do that now. Thanks. I've been careful to delete my pass every time but of course on the last post i mess up. I've done that a few times lol Link to comment https://forums.phpfreaks.com/topic/260596-unread-messages-gmail/page/2/#findComment-1335873 Share on other sites More sharing options...
smarcus3 Posted April 9, 2012 Author Share Posted April 9, 2012 Well I guess its good since it forced me to change my password. Link to comment https://forums.phpfreaks.com/topic/260596-unread-messages-gmail/page/2/#findComment-1335878 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.