PHP邮件功能在浏览器中运行此代码时给出错误值

For some reason I am getting a false value from this function. I will provide all neccessary files for you to help me.

<?php


$to = "emailsendingtoo@mail.com";
$from = "From: emailsendingfrom@mail.com";
$subject = "Hi";
$message = "Hello How are you doing today";

if(mail($to,$subject,$message,$from)){
  echo "mail sent today";
}elseif (mail($to,$subject,$message,$from) === false) {
echo "dudududuududu";
}else {
  echo "nothing";
}

 ?>

That is my function that I am using to try and send mail. Here are my php.ini file settings and my sendmail.ini settings.

php.ini settings:

SMTP =smtp.gmail.com
smtp_port =587
sendmail_from =t-----------@gmail.com
sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"

sendmail.ini settings:

smtp_server=smtp.gmail.com
smtp_port=587
auth_username= t-----------@gmail.com
auth_password= -----------

The last parameter to mail() is "additional headers", so it should be ended with . See example #2 at http://php.net/manual/en/function.mail.php

Try:

$from = "From: emailsendingfrom@mai.com
";