Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #4575

Re: Check email

From Arno Welzel <usenet@arnowelzel.de>
Newsgroups comp.lang.php
Subject Re: Check email
Date 2012-01-22 22:39 +0100
Organization A noiseless patient Spider
Message-ID <4F1C8226.9070708@arnowelzel.de> (permalink)
References <jffv2q$f7g$1@news.albasani.net> <4F1BBAB4.4060909@arnowelzel.de> <01780463-79e4-4ec7-9312-5a9d144c5998@o20g2000yqh.googlegroups.com>

Show all headers | View raw


Captain Paralytic, 2012-01-22 21:24:

> On Jan 22, 7:28 am, Arno Welzel <use...@arnowelzel.de> wrote:
>> 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 = "m...@example.com";
>> $pass = "mypassword";
>> $messagecount = 0;
>>
>> $mbox = imap_open($server, $user, $passwd);
>> if($mbox)
>> {
>>     $messagecount = imap_num_msg($mbox);
>>     imap_close($mbox);}
>>
>> ?>
> 
> Err the question was: Is it possible to find out whether there are any
> new emails in a mailbox
> without logging in ?

My answer was "no" - please read, what i wrote.

> Your solution logs in!

Of course, since it is usually not possible without logging in. If you
know a better way - feel free to post it here. But i assume, you also
don't know a better solution.

There is never a dumb question, just dumb answers ;-)

Well - one could check the filesystem of the mail server with PHP as
well and read the contents without logging in via IMAP/POP3 - but this
means, you need to have access to the filesystem via PP and you need to
know which software is used on the server etc. - i think this is far
beyond the knowledge of the OP.


-- 
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Check email "sl@exabyte" <sb5309@hotmail.com> - 2012-01-22 11:16 +0800
  Re: Check email Jerry Stuckle <jstucklex@attglobal.net> - 2012-01-21 23:15 -0500
    Re: Check email rataplanpupum <rataplanpupum> - 2012-01-22 13:10 +0100
  Re: Check email Arno Welzel <usenet@arnowelzel.de> - 2012-01-22 08:28 +0100
    Re: Check email Captain Paralytic <paul_lautman@yahoo.com> - 2012-01-22 12:24 -0800
      Re: Check email Arno Welzel <usenet@arnowelzel.de> - 2012-01-22 22:39 +0100
  Re: Check email "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2012-01-23 09:41 +0100
  Re: Check email "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-01-23 10:11 +0100
  Re: Check email Redcat <redcat@catfolks.net> - 2012-02-06 23:20 +0000
    Re: Check email Jerry Stuckle <jstucklex@attglobal.net> - 2012-02-06 19:43 -0500

csiph-web