I have my own domain, i.e mydomain.com and own email [email protected] from which I can send email by php script. I also have custom gmail address (from google apps) [email protected] and can login go gmail email panel and can send email from that gmail account.
What usually happens are: 1) I send email (sender: [email protected]) from my domain by php script and also send email (sender: [email protected]) from gmail (google apps).
2) All email comes to [email protected] are received in gmail account, not in domain's webmail.
For this reason, I created the SPF record in Advanced DNS management of my domain as below:
v=spf1 mx a:google.com ~all
Now when I send email from my domain (by php script using smtp) to [email protected], I found SPF: pass in header of the sent mail.
But while I send email from gmail account to [email protected], I found SPF:softfail in header of the sent mail.
What will be the correct syntax of SPF record by which both the email sent will be passed the SPF, sent from my domain and gmail account.
Best way is to include Google's own SPF record:
You are currently using an A-record lookup to the google.com domain, which does not corresponds to IP addresses of their actual SMTP servers.