I have a mailserver without php. The most of us, do not have the possibility to install software in mailserver.
Why you use NextcloudMailCatcher.php to fetch the mail.
Why cant your app fetch mail direct from the mailbox or use third party software to "fetch" mail and deliver it to your app?
bfo