How email gets from your outbox to someone's inbox, and simple ways to stay out of the spam folder
When you press Send, mail servers relay your message, checks like SPF and DKIM confirm it is from you, and spam filters decide where it lands. How it works and how to avoid spam.

The hint
Most email that lands in spam is not blocked for its words. It is blocked because the receiving server cannot confirm who sent it, or because people did not want it. So the habits that help most are simple: send from a properly set up address, send only to people who expect your messages, and write like a person, not a promotion.
If you use your own domain (you@yourbusiness.com), make sure SPF, DKIM and DMARC are set up. If you use a regular Gmail, Outlook or iCloud address, your provider already does that for you.
What happens when you press Send
Email works a lot like the postal system, with servers acting as sorting offices:
- Your app hands the message to your provider's outgoing server.
- The server looks up the recipient's address. For a message to someone@example.com, it asks the internet's address book, DNS, for example.com's MX record, which names the server that accepts its mail. Our guide on what DNS is and how it works explains that lookup.
- The servers talk using SMTP. The Simple Mail Transfer Protocol is the long standing standard for moving mail between servers. Google now requires a secure TLS connection for mail sent to Gmail, so the message is encrypted in transit.
- The receiving server runs checks. It verifies the sender, scans for malware and runs spam filters.
- It files the message. The result is the inbox, a tab such as Promotions, the spam folder, or a rejection that bounces back to you.
Sender checks: SPF, DKIM and DMARC
Anyone can type any name into the "From" line, which is exactly what scammers do. Three DNS based checks let receivers tell real mail from fakes:
| Check | What it does, in plain words | Analogy |
|---|---|---|
| SPF | The domain publishes a list of servers allowed to send its mail. The receiver checks the sending server is on the list. | A guest list at the door |
| DKIM | The sending server adds a digital signature to each message. The receiver checks it with a public key the domain publishes. | A wax seal that shows the letter was not opened or forged |
| DMARC | The domain tells receivers what to do when SPF and DKIM fail (do nothing, send to spam, or reject) and where to send reports. | Instructions for what to do with a forged letter |
Google's sender guidelines require SPF or DKIM for anyone sending to personal Gmail accounts, and SPF, DKIM and DMARC for senders of more than 5,000 messages a day. Mail that fails these checks may be marked as spam or rejected.
Spam filters: what they weigh
After the sender checks, filters look at many signals. Google's guidelines point to several that matter:
- Reputation. Domains and sending servers build a track record. Google asks bulk senders to keep the share of mail people report as spam below 0.3 percent.
- Recipient behavior. If people mark your mail as spam, future mail is more likely to go there. Google says messages from an address in the recipient's contacts are less likely to be marked as spam.
- Honest presentation. Google warns against misleading subject lines, fake "Re:" or "Fwd:" prefixes, display names stuffed with urgency, and hidden content.
- Easy unsubscribing for newsletters and marketing.
Spam filters also protect you. The same checks catch many phishing messages; our hint on how to spot a phishing email or text covers the ones that slip through.
Simple ways to keep your messages out of spam
For everyone:
- Ask new contacts to add you to their address book.
- Write a clear, specific subject line. "Invoice for October tutoring" beats "URGENT!!! Please read".
- Go easy on links and attachments in a first message to someone new.
- Do not send one message to a huge list with everyone in To or CC. Use a proper mailing tool for groups.
- Ask recipients to check spam and mark your message Not spam if it lands there. Google notes this helps future mail from you arrive in the inbox.
If you send from your own domain or run a newsletter:
- Set up SPF, DKIM and DMARC at your domain provider, and include every service that sends for you (your mailing tool, invoicing app and so on) in SPF.
- Only email people who signed up, and never buy email lists.
- Include a visible unsubscribe link, and one click unsubscribe if you send in bulk.
- Increase volume gradually if you are just starting to send a lot of email.
Common mistakes
- Forgetting a new sending service. Adding a newsletter tool without updating SPF and DKIM is a classic cause of sudden spam problems.
- Sending from a personal Gmail address in bulk. Use a proper mailing service for large lists.
- Assuming a password leak is unrelated. If spam is being sent from your account, change your password and check whether your email was in a data breach.
Frequently asked questions
How does an email get delivered?
Your email app hands the message to your provider's outgoing mail server. That server looks up the recipient's domain in DNS to find its mail server (the MX record) and passes the message over using SMTP, the standard mail protocol. The receiving server runs security and spam checks, then places it in the inbox or spam folder.
What are SPF and DKIM?
They are sender checks. SPF is a DNS record listing which servers may send email for a domain. DKIM adds a digital signature to each message that the receiver verifies with a public key published in the domain's DNS. Both help prove a message really came from the domain it claims.
What is DMARC?
DMARC is a DNS record that tells receiving servers what to do with messages that fail SPF and DKIM checks, and where to send reports. Google says it also requires the domain in the From address to match the domain that passed SPF or DKIM.
Why do my emails go to spam?
Common reasons include sending from a domain without SPF or DKIM, sending to many people who did not ask for your messages, recipients marking your mail as spam, misleading subject lines or display names, and lots of links or attachments in a first message. Personal Gmail and Outlook addresses already handle SPF and DKIM for you.
Do I need to set up SPF and DKIM for my personal email?
Usually not. If you send from a big provider's address, such as an @gmail.com account, the provider handles authentication. You need SPF, DKIM and DMARC when you send from your own domain, such as you@yourbusiness.com.