Authenticate Email VIA SPF
You are sending from your host to google over SMTP. This means that Google will see if you host is in your SPF record and act accordingly
So, you have to include your public ip in the SPF record and pray that this is enough.
Also, your username is myemail
not myemail@gmail.com
. And password should be the real password, of course.
If nothing works, consult PHPMailer logs, there should be more hints.