Question

All my emails sent ends in Spam on Gmail

All the emails I’m sending either from php using SMTP with TLS or from the web email client, end in Spam on Google Mail no matter what I do.


Submit an answer
Answer a question...

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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
November 22, 2022

Hi there,

In addition to what has already been mentioned, I could suggest sending an email to the following site:

https://www.mail-tester.com/

This will generate a report for you on why your emails might be ending up in spam.

Hope that this helps!

Best,

Bobby

KFSys
Site Moderator
Site Moderator badge
November 22, 2022

Hi @1ecea24df6134a57a41373199e858,

First, make sure you are using port 465 or 587 for Sending messages auth and authenticating with a mail account associated with your domain.

Next, you’ll need to configure SPF, DMARC, and DKIM records on your Droplet.

DMARC

https://www.digitalocean.com/community/questions/how-to-configure-dmarc

SPF https://www.digitalocean.com/community/tutorials/how-to-use-an-spf-record-to-prevent-spoofing-improve-e-mail-reliability

DKIM For DKIM there are multiple articles you can read on how to add to your Server/Droplet as it’s a standard process.

Once you have these 3 records, you’ll need to check if your IP is on any blacklist server. There are multiple checkers for your IP address, I tend to use https://mxtoolbox.com/blacklists.aspx

Update on that issue: you only have to have one single SPF entry (better to test this with https://www.mail-tester.com/) and that entry must be like:

Record type: TXT Domain name: leave it blank unless you want to use a subdomain TXT Record: v=spf1 +a +mx +a:cranky-knuth.159-65-49-19.plesk.page -all 

DMARC - I have something like:

Record type: TXT Domain name: _dmarc TXT Record: v=DMARC1; p=none 

One of the things that I couldn’t fix was: “Reverse DNS lookup or reverse DNS resolution (rDNS) is the determination of a domain name that is associated with a given IP address. Some companies such as AOL will reject any message sent from a server without rDNS, so you must ensure that you have one. You cannot associate more than one domain name with a single IP address.” This is apparently very tricky because you DigitalOcean will setup the PTR accordingly to the droplet name but if you do have multiple domains hosted on a single droplet then it won’t work. And another one that I don’t know how to solve is: " Your message is not signed with DKIM DomainKeys Identified Mail (DKIM) is a method for associating a domain name to an email message, thereby allowing a person, role, or organization to claim some responsibility for the message."