FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Check email
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Check email [message #176757 is a reply to message #176752] Sun, 22 January 2012 07:28 Go to previous messageGo to previous message
Arno Welzel is currently offline  Arno Welzel
Messages: 317
Registered: October 2011
Karma:
Senior Member
sl@exabyte, 2012-01-22 04:16:

> Is it possible to find out whether there are any new emails in a mailbox
> without logging in ?

No.

> In other words, some PHP codes to return the number of new emails in a an
> email account.

One approach:

<?php
$server = "{pop3.example.com:110/pop3}INBOX";
$user = "mail(at)example(dot)com";
$pass = "mypassword";
$messagecount = 0;

$mbox = imap_open($server, $user, $passwd);
if($mbox)
{
$messagecount = imap_num_msg($mbox);
imap_close($mbox);
}
?>

See more at <http://php.net/manual/en/book.imap.php>.


--
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: reduce all spaces to one
Next Topic: Re: Tips to find Technical Co-founder / Tech lead
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Dec 01 11:23:28 GMT 2024

Total time taken to generate the page: 0.03829 seconds