There are several possible reasons for this problem.
Because of industry wide attempts to minimize spam, some ISP's have turned off PHP mail.
Other ISP's now REQUIRE that sent mail be through secured email accounts which require userid's and passwords before transmission is allowed.
In my case, I had to install PHPmailer to get a package that would allow me to create emails from my website that would meet all of the requirements of my ISP and allow me to generate the emails using PHP.
Other software solution suggestions made by my ISP did not work - primarily because my site was not written under the rules of either a CMS type system like Word Press or using a foundation system like Laravel.
and of course there is the remote possibility that your emails were being treated as spam, because your email server's tcp/ip address was blacklisted. Blacklisting can occur when somebody else on the same shared web server -is- sending spam, and your emails get "discarded" because they are coming from the same tcp/ip address. (This, however, is a condition that your ISP should be able to figure out, and they have to be involved to fix it.)