|I need the header data ["in-reply-to:"] =>, for keeping track of the acknowledgment. When I send the email I keep the email id and so then corresponds exactly to that email acknowledgment.|
I've seen it with var_dump ($ decoded  ['Headers']); does not always get the data ["in-reply-to:"], however if I go into the email if the original data-Message-ID: <eb592ea2163ebde84959c1677f4913e1@domain> which is where I think you get the value.
"Final-Recipient: rfc822; email
Disposition: manual-action/MDN-sent-manually; Displayed"
There may be some error? I can pull the data I Original-Message-ID otherwise?
thank you very much
|2013-04-16 09:18:44 - In reply to message 1 from Silvia|
|I think the problem is that you are trying to display the decode structure in a Web page and if you do not encode the values, browsers will consider anything between < and > as a tag, so you may not see anything in the browser but it is there if you check the page source code.|
You need to use HtmlSpecialChars function to properly display the value in a Web page.
|2013-04-16 17:03:32 - In reply to message 2 from Manuel Lemos|
|Thanks for the reply.|
There are emails that HtmlSpecialChars not fill the data ["in-reply-to:"] =>, but I can draw from $decoded['Parts']["Body"],, collecting the Original-Message-ID:
Thank you very much, I had been locked.
|2013-04-17 03:45:57 - In reply to message 3 from Silvia|
|I think I did not explain myself clearly. HtmlSpecialChars is not to make emails appear in that header. If the emails are in the message, the emails appear in the decoded array.|
The problem is that if you just use var_dump to show the array contents, that function is not be suitable to display the message structure in a Web page because all text needs to be encoded to show in a HTML page, especially if the array has values with the characters <, > or " .
For that you may try instead:
echo nl2br(HtmlSpecialChars(print_r($decoded, true)));