If you want their response to be automatically inserted into the database, you will be assigned a cron job on your server to run the php script to determine if there is a response from the client (you need a list of email tables and client names.
Each time a client uses the ticket system, their email and name are in this table).
You also need to connect to the Inbox using imap or SMTP, and for this there are scripts (phpmailer, swiftmailer, etc.) and "walk" through each email and see if the sender's mail address matches your clients table. Then do an INSERT in the comment table.
The easiest way to read emails is every time the comment page loads, but this will make the page load longer. However, data will always be larger in real time compared to cron jobs.
Freeman latif
source share