P
P
Pavel2017-04-20 21:53:42
PHP
Pavel, 2017-04-20 21:53:42

How to get text in php?

There is a library
https://github.com/optimumweb/php-email-reader-parser
I receive letters, everything is ok.
But how to parse the received text in a letter?
form example:
joxi.ru/J2bDlR6SXvDxJr
I can't figure out how to get this information even in text. or through simple_html_dom to address it.
the body of the message - $htmlmessage
via print_r() prints a lot of things.
$fd = fopen("php://stdin", "r");
$raw = "";
while ( !feof($fd) ) {
$raw .= fread($fd, 1024);
}
fclose($fd);
$email = new Email_Parser($raw);
$parseEmailResult=$email->body;

Answer the question

In order to leave comments, you need to log in

2 answer(s)
[
[email protected], 2017-04-20
@neon51r

https://packagist.org/packages/ddeboer/imap I use this library to get the text of letters

S
Snewer, 2017-04-20
@Snewer

To work with IMAP, I would recommend using:
https://github.com/barbushin/php-imap

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question