从本地apache服务器发送邮件失败,没有给出错误消息

Foreword; I've looked through a lot of topics, done what they said, but nothing works for me - so I made this one.

So I'm using xampp/apache to send mail from a php file, but all I get is "Message delivery failed...".

Does anyone know what I'm doing wrong, or maybe how to display an error of whats going wrong because I don't get any errors.

Here is my code.. (I censored my email and pass for obvious reasons)

if (!mail("censored@gmail.com", "title", "blahblahblah", "From: me@hotmail.com")) {
die("<p>Message delivery failed...</p>") . mysqli_error();
}
?>

sendmail.ini:

smtp_server=smtp.gmail.com
smtp_port=465
auto = use SSL for port 465, otherwise try to use TLS
auth_username=censored@gmail.com
auth_password=censored

php.ini:

sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"

If any additional information is requested it will be from beyond this point.

Try allowing less secure apps to send you email using this link: https://www.google.com/settings/security/lesssecureapps

SElinux blocks sendmail from web server by default, change settings in SElinux as:

setsebool -P httpd_can_sendmail on