I am using php to send emails from my droplet and the emails always go to the gmail spam folder.
Specifically, I see the following:
Received-SPF: pass (google.com: best guess record for domain of www-data@droplet.onlineschoolrecords.com designates 162.243.172.35 as permitted sender) client-ip=162.243.172.35; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of www-data@droplet.onlineschoolrecords.com designates 162.243.172.35 as permitted sender) smtp.mailfrom=www-data@droplet.onlineschoolrecords.com
Something needs to be done in order to avoid having the emails go to the spam folder.
The message “best guess record for domain” indicates that something needs to be done with the subdomain “droplet”?
Do I have to define something in the DNS?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
It appears that you have an SPF record configured for onlineschoolrecords.com, but not droplet.onlineschoolrecords.com, which emails are being sent from. This is why you are seeing that message—Google is guessing that it should use your domain’s SPF record for the subdomain as well.
Consider using DKIM in order to try and improve deliverability rates. See this tutorial—it is a bit old, but the instructions should still work.
You can also use this tool to check your server’s settings and see if you can improve anything else: https://www.mail-tester.com
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.