Imap remains open after you search and doesn't close until you call imap_close.
Firstly the code shouldn't be written like that, while should not operate on a
fail condition of a function exec, that's just bad coding practice and that's
what causes a loop here. If there are no messages in the
hi ! it works if there is / are emails in the box before script run (i use
cli not web based) but after it works 1 time it doesnt work again it enters
to infinite loop ,
at that line
while(!$emails) { $emails = imap_search($inbox,'ALL'); echo email yok\n;
print_r($emails); }
I've to search for messages from Gmail Inbox over IMAP using search by
SUBJECT . The php-imap imap_search() works fine when the subject is pure
alphanumeric. If the subject string has an apostrophe or a dash then the
search fails.
imap_seach($mbox, 'ALL SUBJECT search string');
I've to search for messages from Gmail Inbox over IMAP using search by
SUBJECT . The php-imap imap_search() works fine when the subject is
pure
alphanumeric. If the subject string has an apostrophe or a dash then
the
search fails.
imap_seach($mbox, 'ALL SUBJECT search string');
Hey there,
i am trying to use the imap_search function oh PHP.
In the documentation it says i can use ON to search for
a date. Whenever i try that I get:
Unknown search criterion: ON
Which is wired because ON is even mentioned in
the IMAP2 criteria?!?
Any ideas what's wrong?
Greets,
2007. 11. 22, csütörtök keltezéssel 21.15-kor Max Frigge ezt írta:
Hey there,
i am trying to use the imap_search function oh PHP.
In the documentation it says i can use ON to search for
a date. Whenever i try that I get:
Unknown search criterion: ON
Which is wired because ON is
Does the imap_search support multiple criteria?
I've got the following successfully returning the correct results:
?php
$search[0] = BODY \test\;
$search[1] = SUBJECT \test\;
foreach ($search as $criteria) {
$search_result[]=$imap_search($mailbox,$criteria,$SE_UID);
}
Hello:
Here is my code :
/---/
$mails = imap_search($mbox, 'TO gentoo-user-[EMAIL PROTECTED]',SE_UID);
echo sizeof($mails);
/--/
You can start to parse the mailheader,mailbody...
for($i=0;$icount($mails);$i++)
{
[EMAIL PROTECTED]($mbox,$mails[$x-1]);
echo
On Thu, 26 Aug 2004 22:25:00 +0800, fongming
[EMAIL PROTECTED] wrote:
Hello:
Here is my code :
/---/
$mails = imap_search($mbox, 'TO gentoo-user-[EMAIL PROTECTED]',SE_UID);
echo sizeof($mails);
/--/
You can start to parse the mailheader,mailbody...
On Thu, 2004-08-26 at 09:25, fongming wrote:
for($i=0;$icount($mails);$i++)
{
[EMAIL PROTECTED]($mbox,$mails[$x-1]);
echo $subject=$h-subject;
echo $sender=$h-from[0];
echo BR;
}
Calling count() every time the for loop iterates is inefficient.
$count = count($mails);
for($i=0;
Hello,
I'm trying to make a small script to show mails on a imap server with
a criteria.
Here is my code :
/---/
$mails = imap_search($mbox, 'TO [EMAIL PROTECTED]',SE_UID);
echo sizeof($mails);
/--/
The connection to the server is the working, the search also,
hi.
in the php manual
the entry for imap_search states it has 3 arguments
imap_search ( resource imap_stream, string criteria, int options)
i get the first 2, but whats the third.
at the end of the page it says
Valid values for flags are SE_UID, which causes the returned array to
contain UIDs
$search = imap_search ($mail, TO reply, SE_UID);
returns the same values as
$search = imap_search ($mail, TO reply);
search whorks ok, but it doesnt return message
id's. or this is imap-only flag and it won't work
with pop3 connection?
--
Andrew Perevodchik
[EMAIL PROTECTED]
--
PHP
Hello
I'm trying to use imap_search to retrieve the all the post after a given
date and then put them into a mysql DB. I don't know if this is the best way
to do it.
$searchstr = SINCE Thu, 30 Aug 2001 12:05:49 +0200;
$search = imap_search($nntp, $searchstr, SE_UID);
This should give me a
14 matches
Mail list logo