You have a fatal php parse/syntax error on line 11 and your code is not running at all.
You need to set php’s error_reporting to E_ALL and display_errors to ON, in the php.ini on your development system (you cannot put these settings into your code and have them work for this type of error since your code doesn’t run) so that php will help you when learning, developing, and debugging code.
PkraM, the function does not need to be wrapped in parentheses. Adding the missing one does not make it better, when the first part shouldn’t be there.
Posting ‘fixed’ code or code to try, without including an explanation of what was fixed or why to do something differently, is not helpful. It doesn’t teach anything.
You have also incorrectly altered the OP’s program logic, so that the - “You must fill in all fields…” output will be displayed when the mail() call fails, not when one or more of the form field values are empty. Wouldn’t a message indicating that the email could not be sent (and logging the actual error information being returned to php) be the ‘fixed’ logic?
If you are serious about helping, take the time to post things that add to the thread you are posting in.