PHP Mail() scripts do not work with configured external SMTP server. This can be verified in Tools & Settings > External SMTP Server
The following error appears in
Port misconfiguration for the external SMTP server configured in Plesk.
Go to Tools & Settings > External SMTP Server and configure a valid port according to the external SMTP server requirements