Exception when attempting to process bounced email and monitored email box

Do you have the php-imap PHP module installed?
Run the command rpm -qa | grep php (CentOS) or dpkg -l | grep php (Ubuntu) and see if it is listed.

If not, try installing it through the package manager
sudo apt install php-imap (CentOS) or sudo yum install php-imap (Ubuntu)
then restart your web server and the PHP-FPM process (if using PHP-FPM).

Apache: sudo systemctl restart httpd (CentOS)
or sudo systemctl restart apache2 (Ubuntu)
Nginx: sudo systemctl restart nginx
PHP-FPM: sudo systemctl restart php-fpm