In case your php application stopped sending emails via sendmail, check and Change sendmail_path on php.ini

TL;DR

check /usr/sbin using via ssh or filezilla or putty or whatever you use if it has a file named sendmail on it.
if it has sendmail.postfix on it you need to change the sendmail path on php.ini file on your cyberpanel
login to cyberpanel via the port you use ->php->edit php config → click and advanced and select the php version you are using for the application then find this line
sendmail_path = /usr/sbin/sendmail -t -i
change it to
sendmail_path = /usr/sbin/sendmail.postfix -t -i

This is more of tip for everyone. we recently moved from our old hosting provider to a new one.
we have successfully moved everything and almost everything was fine except for one thing our applications are not sending emails.
we spent about a week troubleshooting and even contemplating if the move to our new hosting provider was a bad idea. logs did not help that much so resulted to rewriting some parts and components that we use to use smtp instead of sendmail … fast forward a couple of days later by mistake across the urs/sbin directory and realize oh sendmail with postfix here is a bit different.
this solution can also help those with wordpress installs not sending emails.

hope it helps guys .