M
M
Modrek2019-08-18 13:07:03
PHP
Modrek, 2019-08-18 13:07:03

How to find email correspondence and display it on the site using imap?

For the second day I can not solve the issue of loading correspondence via imap with a specific email. It turns out to receive all letters, and I try imap_search () to find letters, returns false. Like there are no letters, although they are on email.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Maxim, 2019-08-18
@Modrek

It would not be bad to show how you use .... In the meantime, such an answer.
On Yandex and other services, most likely a cache on the search, which is not updated so often, so it does not start seeing letters right away. Sometimes it finds it, sometimes it doesn't. Therefore, it is generally better to abandon the imap_search function and search locally.
For example: https://it-wiki.org.ua/php/receiving_incoming_mail_imap

D
Dimonchik, 2019-08-18
@dimonchik2013

what is the text inside imap_search() ?

G
grinat, 2019-08-19
@grinat

If it's false, then you're wrong, there's a special syntax:

$conn   = imap_open('{imap.example.com:993/imap/ssl}INBOX', '[email protected]', 'pass123', OP_READONLY);
$some   = imap_search($conn, 'SUBJECT "HOWTO be Awesome" SINCE "8 August 2008"', SE_UID);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question