0


When I send a letter from my application, it comes without previous chat messages. Message contain "In-Reply-To" and "References" headers. Letter is correct inserted to the required gmail threads on both gmail accounts, but without previous chat messages. How to send a letter with this messages, like as gmail? On the screenshots two messages, first - from my application, second - from gmail. The message from gmail contain previous messages under grey button.

1) https://i.stack.imgur.com/flPMQ.png
2) https://i.stack.imgur.com/61SdM.png

Should i put previous messages itself? If I should add them, how gmail understand, that this is the previous messages, but not part of the new message, and hide them under the button?

Payload structure of message, which i send:

'message' => [
            'raw'      => $this->encodeMessage($message),
            'threadId' => 15501b6d82e7test
        ]

My MIME example:

To: recipient@mail.local
In-Reply-To: <id_5_message@gmail.local>
References: <id_3_message@gmail.local> <id_4_message@gmail.local> <id_5_message@gmail.local>
From: sender@mail.local
Subject: =?utf-8?B?0KLQtdC80LAg0YHQvtC+0LHRidC10L3QuNGP?=
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary=alternativeBoundary


--alternativeBoundary
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: base64
Content-Disposition: inline

0JTQvtCx0YDRi9C5INC00LXGMLgoK0JjQvdGC0LXRgNC10YHRg9GO0YIg0L/QvtC00YDQ
vtCx0L3QvtGB0YLQuCDQv9GA0L7QstC10LTQtdC90LjRjyDQutCw0LzQv9Cw0L3QuNC4

--alternativeBoundary
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: base64
Content-Disposition: inline

PGRpdiBkaXI9ImxldHRlciI+0JTQvtCx0YDRi9C5INC00LXQvdGMLjxicj48YnI+0JjQvdGC
0LXRgNC10YHRg9GO0YIg0L/QvtC00YDQvtCx0LtGB0YLQuCDQv9GA0L7QstC10LTQtdC9
0LjRjyDQutCw0LzQv9Cw0L3QuNC4PC9kaXY+

--alternativeBoundary--
Kumirska
  • 16
  • 3

0 Answers0