Authenticate Email VIA SPF Authenticate Email VIA SPF php php

Authenticate Email VIA SPF


Since you are sending the email with Google's smtp, you have to include it in your SPF:

include:_spf.google.com


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.