What is a mail server?

Still have a question, spotted an error, or have a better explanation or a source we should cite?

A mail server is a computer that handles the technical work of sending, receiving, and storing email. When you send an email, your mail server connects to the recipient's mail server and hands off the message. When someone emails you, their mail server delivers it to yours, where it sits until you open your inbox.

Mail servers use specific protocols to do their job. SMTP (Simple Mail Transfer Protocol) handles outgoing mail and server-to-server transfers. IMAP (Internet Message Access Protocol) and POP3 (Post Office Protocol) handle how you retrieve messages from the server to your device. SMTP pushes mail out, IMAP and POP3 pull it in.

If you use Gmail, Outlook, or Yahoo Mail, you're connecting to their mail servers. When you check email on your phone, you're pulling messages from a mail server (usually via IMAP). When you hit send, your device talks to an outgoing mail server (SMTP) to relay the message.

For most people, "mail server" just means Gmail's servers or Outlook's servers. You don't run one yourself. But if you're sending marketing or transactional email for a business, you're either using an Email Service Provider (like Mailchimp or SendGrid) that runs mail servers for you, or you're configuring your own outgoing mail server (which means setting up SMTP, DNS records, and authentication).

The confusion most senders hit: "Do I need to set up a mail server?" Usually no. If you're using an ESP, they handle the mail server. If you're sending through Google Workspace or Microsoft 365, same thing. You only configure your own mail server if you're running email infrastructure in-house or using a relay service like Mailgun or AWS SES.

Next step: If you're trying to figure out whether you need your own mail server or an ESP, check out what an ESP actually does. If you're debugging delivery and need to see how mail servers talk to each other, read what happens when you press Send.

Contributors

Who worked on this answer

Every name links to their profile. Every company links to their site. Real people, real accountability.

Ask an AI · tailored to your setup

Get personalized setup advice

I read this on the Email Almanac about mail servers and how they send, receive, and store email using SMTP, IMAP, and POP3. Help me figure out MY setup. I need: 1. Do I even need a mail server? Or am I using one without knowing it (ESP, Gmail, Outlook)? 2. If I'm using an ESP, what does the mail server part mean for me? What do I actually configure? 3. If I need to set up SMTP, what records and settings matter for deliverability? 4. Common mistakes senders make when they confuse mail servers with ESPs or webmail --- My details: - Email platform/ESP: e.g. Mailchimp, SendGrid, Gmail, custom SMTP, not sure - Sending domain: your domain - What I'm building: newsletter, transactional emails, internal company email - Current challenge: describe what prompted this question

Edit the yellow boxes, then send to the AI of your choice.