PHP邮件收件箱(IMAP)如何在PHP(Laravel)上对每个会话邮件收件箱进行分组?

I had a problem with grouping message for reply so we can see history of conversation. Is there a way for grouping it? variable that I can get from imap:

  1. id
  2. date
  3. subject
  4. fromName
  5. fromAddress
  6. to
  7. toString
  8. cc
  9. replyTo
  10. messageId
  11. textPlain
  12. textHtml

Did I just need to store it to my DB and groupby it by fromAddress and subject? but subject for reply is "Re: subject", right?