PHP not sending email

A simple answer was already given to you. If you find this hard to do, then programming isn’t for you. Programming consists of a lot of problem solving, self teaching, and self awareness. If you do not have any of those, you won’t get very far.

People find that the syntax for any programming language is hard. I say it’s not. Knowledge doesn’t come to you, you have to learn it yourself. This is where self teaching comes from. If you can’t find answers yourself before asking a question, you’ll always end up back at the start.

Now. Use PHPMailer as the default mail() function is not reliable and has been an issue on some live hosts. Here is an important reminder why you should not use the default mail() function.