I\'m trying to send an HTML message while using SMTP authentication to Gmail in PHP. Here is the script that I am using:
require_once \"Mail.php\";
require_o
Try embracing the names in double quotes, like so:
$from = '"Some Name" ';
$to = '"Other Name" ';
try it and tell us about it.
Update:
Ok, above didn't work, so I just would tell you what it's working for me in my php pages to send emails through smtp gmail.
so based on that you could try to change your config to:
$host = "tls://smtp.gmail.com";
$port = "587";
you can see here how to send mail through gmail with phpmailer.