You most likely answer is that the server does not have mail enabled
Use phpinfo() to find which ini file you should be editing and make sure that you php server is set up to send mail.
; For Win32 only.
sendmail_from = me@example.com
Alternatively use SMTP and connect to a service like Mailgun https://documentation.mailgun.com/quickstart-sending.html#send-via-smtp