Yii2 application send receive emails - swiftmailer

In a Yii2 Application one can receive a form post to the database as if it were an email.
In that same Yii2 application I can read and reply to the sender via swiftmailer.
After sending the email reply from the application with a reply address that was configured, the person receiving the reply from the application, will want to reply and will reply.
That email goes to the configured reply account on the server, accessible via any email client.

What is intended is to receive that reply directly in the yii2 application, next to the initial post, as if it were a conversation concatenating the conversation in the database.

What is the best way to receive this reply from the client?
Can one define in the reply address a url to a form that converts the html email to hidden fields of a form to post?

Can anyone point me to an example, or help?


I created a yii command that retrieves mail from the mail server with imap.
It is triggered every few minutes by cron.

Imap driver:

Mail processing: