S
S
szubcu2014-11-20 19:05:38
PHP
szubcu, 2014-11-20 19:05:38

Is it possible to read multiple mailboxes without disconnecting from the server?

The essence of the task is to read some number of mailboxes from the mail server. For example, there is data on 10 mailboxes on yandex.ru or on gmail.com.
Standard procedure for reading emails:
1. Connect to the server (authorize as user 1)
2. Read emails
3. Disconnect from the server
4. Connect to the server (log in as user 2)
....
At the same time, even if all mailboxes are on the same and the same mail server - a new connection must be established for each mailbox. Which takes a lot of time.
Is it possible to change the script to:
1. Connect to the server
2. Log in as user 1
3. Read emails
4. Log out as user 1
5. Log in as user 2
.....
xxx. Log out as user N
yyy. Disconnecting from the server?
Tried to read mail through sockets. But after the LOGOUT command (for Imap), the mail server refuses to accept new commands (LOGIN, etc.)
Has anyone met with this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Aksentiev, 2014-11-20
@Sanasol

As far as I can tell from experience, this is not possible, each mail request is a connection, etc. Even when using your mail server with a web muzzle on the same server.
As an option, I would advise you to collect all letters on one box (Yandex knows how, I don’t know Google), and then pick up mail from it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question