I
I
Iossarian2019-03-11 15:01:09
PHP
Iossarian, 2019-03-11 15:01:09

How to extract headers from emails using iMAP?

Good afternoon. It is necessary to extract from the letter the text "The letter was sent to a non-existent address [email protected]". However, this line is not in the body of the letter, the heading in the open letter is also different. I tried to pull information from many parts of the letter, but the required fragment could not be found. Does anyone have any thoughts on this? Thank you.
5c864dfc49833021935984.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Dubrovin, 2019-03-11
@Iossarian

Most likely, there is no such text in principle, and what you see is not a letter, but a human-readable representation of the DSN. The DSN format is described in https://tools.ietf.org/html/rfc3464
To get the same information directly from an email, you need to implement parsing of emails in the DSN format yourself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question