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= -----------