Please check to make sure that IIS for webmail is set to parse PHP pages in CGI mode as it will not work with PHP in ISAPI mode.
To verify PHP is running in CGI for webmail, go to IIS Manager -> Websites -> webmail -> properties.
Select the home directory tab -> Configuration -> Application mappings, ensure that the extension .php is being handled by the executable version of PHP which is in
“C:\Program Files\SWsoft\Plesk\Additional\Php\php.exe”.