Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #4562 > unrolled thread
| Started by | "sl@exabyte" <sb5309@hotmail.com> |
|---|---|
| First post | 2012-01-22 11:16 +0800 |
| Last post | 2012-02-06 19:43 -0500 |
| Articles | 10 — 8 participants |
Back to article view | Back to comp.lang.php
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
| From | "sl@exabyte" <sb5309@hotmail.com> |
|---|---|
| Date | 2012-01-22 11:16 +0800 |
| Subject | Check email |
| Message-ID | <jffv2q$f7g$1@news.albasani.net> |
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.
[toc] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2012-01-21 23:15 -0500 |
| Message-ID | <jfg2h6$6t0$2@dont-email.me> |
| In reply to | #4562 |
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@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | rataplanpupum <rataplanpupum> |
|---|---|
| Date | 2012-01-22 13:10 +0100 |
| Message-ID | <4f1bfcae$0$1390$4fafbaef@reader2.news.tin.it> |
| In reply to | #4564 |
> 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!!!
[toc] | [prev] | [next] | [standalone]
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Date | 2012-01-22 08:28 +0100 |
| Message-ID | <4F1BBAB4.4060909@arnowelzel.de> |
| In reply to | #4562 |
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@example.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
[toc] | [prev] | [next] | [standalone]
| From | Captain Paralytic <paul_lautman@yahoo.com> |
|---|---|
| Date | 2012-01-22 12:24 -0800 |
| Message-ID | <01780463-79e4-4ec7-9312-5a9d144c5998@o20g2000yqh.googlegroups.com> |
| In reply to | #4567 |
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!
[toc] | [prev] | [next] | [standalone]
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Date | 2012-01-22 22:39 +0100 |
| Message-ID | <4F1C8226.9070708@arnowelzel.de> |
| In reply to | #4572 |
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
[toc] | [prev] | [next] | [standalone]
| From | "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> |
|---|---|
| Date | 2012-01-23 09:41 +0100 |
| Message-ID | <jfj6gf$3r0$2@dont-email.me> |
| In reply to | #4562 |
El 22/01/2012 4:16, sl@exabyte escribió/wrote: > Is it possible to find out whether there are any new emails in a mailbox > without logging in ? Only in public mailbox systems like "mailinator.com". Mail, in general, is supposed to be private. -- -- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain -- Mi sitio sobre programación web: http://borrame.com -- Mi web de humor satinado: http://www.demogracia.com --
[toc] | [prev] | [next] | [standalone]
| From | "M. Strobel" <sorry_no_mail_here@nowhere.dee> |
|---|---|
| Date | 2012-01-23 10:11 +0100 |
| Message-ID | <9o4mhiF5vtU1@mid.uni-berlin.de> |
| In reply to | #4562 |
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.
[toc] | [prev] | [next] | [standalone]
| From | Redcat <redcat@catfolks.net> |
|---|---|
| Date | 2012-02-06 23:20 +0000 |
| Message-ID | <9pb5iqF4l0U18@mid.individual.net> |
| In reply to | #4562 |
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
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2012-02-06 19:43 -0500 |
| Message-ID | <jgps2v$jeo$1@dont-email.me> |
| In reply to | #4747 |
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@attglobal.net ==================
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.php
csiph-web