Well I didn't have to change anything in the PHP, and mine is sending just fine. Try using this for help. And make sure your PHP supports SSL.
https://support.google.com/mail/bin/ans … swer=13287