Problem with submitting .php form to email

Hi and welcome to the forum! Free hosting supports sending emails through forms, but the mail() function is heavily restricted. So you’ll have to use PHPMailer with Gmail’s SMTP server or whichever SMTP server you want to use; here are two KB articles (which the other two down below posted as well):