I am unsing zend-mail to reply to emails and laravel-imap to retrieve emails.
I found that I need to set email headers In-Reply-To
and References
if I want to get the reply/answer chain.
I made a test through the web interface. I send 3 emails/replies. If I access the most recent email with laravel-imap it looks like this:
I just get the HTML body. The blockquotes are already there. The relevant header data looks like this:
in_reply_to: "<384147642.238334.1576579700275@ox.hosteurope.de>"
message_id: "<320022621.238341.1576579713511@ox.hosteurope.de>"
references: "<1031599702.238330.1576579685138@ox.hosteurope.de> <384147642.238334.1576579700275@ox.hosteurope.de>"
Now I do exactly the same in my application. I use zend-mail to send/reply to emails. But If I get the HTML body I only see:
Web 2
In my case the relevant header data looks correct aswell:
in_reply_to: "<59b58fd747e1155deb1f3ab9b8050607b6e52897@localhost.eu>"
message_id: "<e17eadb481c0c538289a8bf3190da409f3ede695@localhost.eu>"
references: "<bccc37f17dc69b9811ed59c75b3e466d08b1a9d5@localhost.eu> <59b58fd747e1155deb1f3ab9b8050607b6e52897@localhost.eu>"
So where is my problem? I remember reading that the HTML body with references is created automatically if references are set, which they are in my case.
Or should I manually append contents of the referenced email into the textarea if I reply to an email?