PHP - HTML Code Help -- 2

Job ID: 33491708

Budget: €8 – €15 EUR

We are using the below code in order to catch the Subject of emails from postcat command ( queued emails) and present it to a web interface that we have done. The problem is that when we send an email with one Bcc address , postfix will show normal two emails with two same subjects as per attached example.

We need a way to show only one row and make an expand in order to show also the other Recipients , as the Subject is the same. Also view and delete options should be available on the Expand.

Also we need to avoid any conflict with another message which has the same subject but another Arrival Time.
Related categories: PHP HTML CentOs Postfix