Troubleshooting

Why some emails end up in spam and how to diagnose it

Reviewed on 4 min read deliverability spam

An email landing in spam isn't the same as a rejection. In a rejection, the recipient server doesn't accept the message and returns an SMTP code; when it shows up in junk mail, the receiver did accept it and then classified it with its own filters.

Confirm what happened to the message

First check cPanel's Track Delivery and find the message by sender, recipient or date:

  • A final 250 response after the message is transmitted means the remote server accepted it for processing. From that point on, the receiving provider decides which folder to show it in.
  • A 4.x.x response usually means a temporary deferral. Don't resend aggressively.
  • A 5.x.x response is a permanent rejection. Keep the full code and text so you can fix the cause.

Without that result there is no way to know whether the problem lies in transport or in the later classification.

Common reasons for being classified as spam

  • Incomplete authentication: SPF, DKIM and DMARC missing, invalid or not aligned with the sender's visible domain.
  • Reputation: the history of the domain or IP, complaints, bounces, compromised sending or sudden spikes in volume.
  • Content and links: URLs with a poor reputation, misleading subjects, broken HTML or a template very different from usual messages.
  • Lack of consent: old or bought lists, inactive recipients and no clear way to unsubscribe.
  • Sender spoofing: using a domain in From that doesn't match the authenticated service. In forms, use your own account as the sender and the visitor's address in Reply-To.

What to check before sending again

  1. Review the deliverability, SPF, DKIM, DMARC and PTR setup.
  2. Send a representative sample to our email test from the same account or application that is failing.
  3. Check the original headers of the received message: SPF, DKIM and DMARC results, outgoing server and return domain.
  4. If you send to Gmail in sufficient volume, use Google Postmaster Tools to review reputation and spam rate.
  5. Reduce volume if bounces or complaints have increased, and ramp it up again gradually once the cause is fixed.

Marking a legitimate message as Not spam helps that recipient's filter, but it doesn't replace fixing authentication, reputation or sending-practice problems. Nor is there an external score that guarantees the inbox at Gmail, Outlook or other providers.

If the email is sent from an application, use authenticated SMTP instead of PHP's mail() function. See the setup for WordPress or PrestaShop, and turn on PHPMailer debug mode if you need to see the SMTP response.

Compare samples without exposing customer data

Test a plain message and one with the failing template separately, using test recipients you control. Keep the subject, time, message ID and headers so you can match them with delivery tracking. Don't send invoices, personal data or confidential messages to public scoring services.

If only one campaign or one receiving provider fails, that difference helps narrow down the diagnosis. Check the links and the reply address too. Setting up SMTP makes it easier to identify and log what is sent, but it doesn't guarantee a good reputation or the inbox on its own.

You may also find useful

Something wrong or out of date? Tell us and we will review it.