Check email [message #176752] |
Sun, 22 January 2012 03:16 |
sl@exabyte
Messages: 16 Registered: March 2011
Karma: 0
|
Junior Member |
|
|
Is it possible to find out whether there are any new emails in a mailbox
without logging in ?
In other words, some PHP codes to return the number of new emails in a an
email account.
Thanks.
|
|
|
Re: Check email [message #176754 is a reply to message #176752] |
Sun, 22 January 2012 04:15 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma: 0
|
Senior Member |
|
|
On 1/21/2012 10:16 PM, sl@exabyte wrote:
> Is it possible to find out whether there are any new emails in a mailbox
> without logging in ?
>
> In other words, some PHP codes to return the number of new emails in a an
> email account.
>
> Thanks.
>
>
No.
But then this should be asked in an email newsgroup. It has nothing to
do with PHP (any language could be used).
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
|
|
|
|
Re: Check email [message #176758 is a reply to message #176754] |
Sun, 22 January 2012 12:10 |
rataplanpupum
Messages: 2 Registered: December 2011
Karma: 0
|
Junior Member |
|
|
> But then this should be asked in an email newsgroup. It has nothing to
> do with PHP (any language could be used).
>
sei una vera rottura di coglioni!!!
|
|
|
Re: Check email [message #176761 is a reply to message #176757] |
Sun, 22 January 2012 20:24 |
Captain Paralytic
Messages: 204 Registered: September 2010
Karma: 0
|
Senior Member |
|
|
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 ?
Your solution logs in!
|
|
|
Re: Check email [message #176764 is a reply to message #176761] |
Sun, 22 January 2012 21:39 |
Arno Welzel
Messages: 317 Registered: October 2011
Karma: 0
|
Senior Member |
|
|
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
|
|
|
|
Re: Check email [message #176777 is a reply to message #176752] |
Mon, 23 January 2012 09:11 |
M. Strobel
Messages: 386 Registered: December 2011
Karma: 0
|
Senior Member |
|
|
Am 22.01.2012 04:16, schrieb sl@exabyte:
> Is it possible to find out whether there are any new emails in a mailbox
> without logging in ?
>
> In other words, some PHP codes to return the number of new emails in a an
> email account.
>
> Thanks.
>
>
Yes it is possible. If the mails are in a user's mailbox on a unix server you can use
the finger utility:
-l Long format. Produces a multi-line format displaying all of the information
available from the -s option as well as the user's home direc-
tory, home phone number, login shell, mail status, and the contents of
the “.plan” and “.project” files from the user's home directory.
Yes, it's a fun idea. But consider mails sent to system account on linux systems
without beeing forwarded.
/Str.
|
|
|
Re: Check email [message #176932 is a reply to message #176752] |
Mon, 06 February 2012 23:20 |
Redcat
Messages: 3 Registered: February 2012
Karma: 0
|
Junior Member |
|
|
On Sun, 22 Jan 2012 11:16:38 +0800, sl@exabyte wrote:
> Is it possible to find out whether there are any new emails in a mailbox
> without logging in ?
>
> In other words, some PHP codes to return the number of new emails in a
> an email account.
>
> Thanks.
Is the maildir or mailbox in which the mail resides on the server which
is running PHP?
Redcat
|
|
|
Re: Check email [message #176933 is a reply to message #176932] |
Tue, 07 February 2012 00:43 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma: 0
|
Senior Member |
|
|
On 2/6/2012 6:20 PM, Redcat wrote:
> On Sun, 22 Jan 2012 11:16:38 +0800, sl@exabyte wrote:
>
>> Is it possible to find out whether there are any new emails in a mailbox
>> without logging in ?
>>
>> In other words, some PHP codes to return the number of new emails in a
>> an email account.
>>
>> Thanks.
>
> Is the maildir or mailbox in which the mail resides on the server which
> is running PHP?
>
> Redcat
It depends completely on your hosting company's setup. But you probably
won't be able to access it unless you have root privileges (or
privileges of your host's email user id).
Talk to your hosting company.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
|
|
|