V
V
v3shin2017-05-25 17:27:34
PHP
v3shin, 2017-05-25 17:27:34

How to get full imap response via php curl?

Good day.
I'm trying to get the message data using the imap protocol with curl without marking it as read:

curl_setopt_array($this->conn, [
    CURLOPT_CUSTOMREQUEST => 'FETCH '.$uid.' BODY.PEEK[TEXT]',
]);
$ret = curl_exec($this->conn);
var_dump($ret);exit;

As a result I get:
string '* 381 FETCH (BODY[TEXT] {1311}
' (length=32)

And how to get the rest of the response lines?
Thanks in advance.
PS:
curl_setopt_array($this->conn, [
    CURLOPT_URL => $url.';UID='.$uid.'/',
]);

Thus, the answer is complete.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question