Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6868921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:29:37+00:00 2026-05-27T03:29:37+00:00

PHP imap_sort has an undocumented $search_criteria parameter. I’m writing a little script that should

  • 0

PHP imap_sort has an undocumented $search_criteria parameter. I’m writing a little script that should fetch mail containing a PIN code (five digits) in subject. Eventually not interested in any other mail. How can i specify my filter rule?

array imap_sort ( resource $imap_stream , int $criteria , int $reverse [, int
    $options = 0 [, string $search_criteria = NULL [, string $charset = NIL ]]] )
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T03:29:37+00:00Added an answer on May 27, 2026 at 3:29 am

    Not true. It is documented. But obviously not at this function.

    Better function for mail searching is imap_search (it has documented $criteria). Search criteria is also defined in RFC 1176 (page 15 & 16).

    Next thing is, that you cannot search with pattern, only string, so this will not work for you. I propose, that you fetch all e-mails, and compare subject that you need. You can limit your search by date…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a simple php script for reading emails. When I extract mail
I have PHP script that fetch messages from a mailbox. I use the imap_search
I have written a php e-mail processing client that uses the IMAP protocol. I
I have developed a script that uses php's imap_search and when it gets to
We have a cron'ed PHP script that checks an inbox every ten minutes. The
I found this script: http://code.google.com/p/php-mime-mail-parser/ It does a much better job parsing the email
I want to run a php script ( for example mail.php ) when anyone
PHP has a great function called htmlspecialcharacters() where you pass it a string and
PHP has a number of opcode caches, which as i understand it are scripts
PHP has a very nice function, isset($variableName). It checks if $variableName is already defined

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.