SMTPHub Technologies Sdn Bhd  ·  support@sendergun.com● 99.99% Uptime SLA  ·  24/7 Support
HomeAbout Bulletproof SMTP — Dedicated Plans Pricing & comparison — 6 plans Instant-Ready Clean IPs SPF, DKIM, DMARC & rDNS IP Rotation Simulator Custom 256–512 IP Clusters Infrastructure & Datacentres Pricing — All Plans & Setup SMTP Setup Service PowerMTA Setup Exim Setup Postfix Setup BlogContact Client Login — panel.sendergun.com Order SMTP →
MTA Architecture

How SMTP Works: From Your App to the Inbox, Step by Step

One email, six steps, a few seconds. Follow the journey from your app to your customer's inbox — and learn where it can go wrong.

December 4, 2026 · SenderGun

Hand posting a letter into mailboxes — how SMTP sends mail from your app to the inbox
Hand posting a letter into mailboxes — how SMTP sends mail from your app to the inbox

When you press send on an email, it usually arrives in seconds. What happens in between is invisible — a short chain of servers handing your message along, checking it, and deciding whether it can be trusted. Most of the time it just works. But when an email goes missing or lands in spam, understanding that chain is the difference between fixing the problem in ten minutes and guessing for a week.

This guide follows one email on its full journey, step by step, from your app to the inbox. No technical background is needed.

Key takeaways: (1) An email passes through two servers: your SMTP server sends it, and the recipient's mail server receives it. (2) Before sending, your server looks up the recipient's domain in DNS to find the right mail server. (3) The two servers hold a short, formal conversation — hello, sender, recipient, then the message itself. (4) The receiving server checks SPF, DKIM, DMARC and your sender reputation before deciding inbox or spam. (5) If delivery fails temporarily, your server queues the message and retries; if it fails permanently, you get a bounce.

The cast of characters

Before the journey starts, it helps to know who is involved. There are five players, and each one has a single job.

You, the sender, and your app. This is your website, your shop, your customer system, or your email app — whatever creates the message. Your app does not deliver email itself. It hands the message to an SMTP server and asks it to do the delivery.

Your SMTP server. This is the sending server. It takes the message from your app, finds the recipient's mail server, and delivers it. When you use SenderGun, this is your dedicated server, running mail software such as PowerMTA, with your own IP addresses.

The domain name system, or DNS. DNS is the internet's address book. Your SMTP server asks DNS one question: which mail server handles email for this domain? The answer is called an MX record, and it points to the receiving server.

The recipient's mail server. This is the server that owns the inbox — for example, Gmail's servers for a Gmail address. It receives the message, checks it, and either places it in the inbox or rejects it.

The recipient and their inbox. The person at the end of the chain reads the email using IMAP or POP3. That last step — reading — is separate from sending, and it is not part of SMTP at all.

Step 1: You press send

Everything starts in your app. Imagine you run a small online shop. A customer places an order, and your shop needs to send an order confirmation. Your shop's software writes the email — the customer's name, the order number, the total — and then connects to your SMTP server using the credentials your provider gave you: the server address, the port, a username and a password.

Your app and your SMTP server then have a short, secure exchange. Your app proves who it is by logging in, and the server agrees to accept the message. This login step is important: it stops strangers from using your server to send spam. Without it, anyone on the internet could send email through your server and destroy your reputation. That is also why your SMTP password should be kept secret and changed if it ever leaks.

Once the login succeeds, your app hands over the message. At this point your app's job is done. It can go back to running your shop. The SMTP server now owns the delivery.

Step 2: Your server finds the right destination

Your SMTP server now reads the recipient's address and looks at the domain — the part after the @ sign. Suppose the customer ordered with an address at example.com. Your server asks DNS: which mail server accepts email for example.com?

DNS answers with an MX record. An MX record is a small entry in the domain's DNS settings that names the mail server responsible for that domain. Large providers often have several MX records, ranked by priority, so that if one server is busy, your server can try the next one. If the domain has no MX record at all, your server cannot deliver the message, and the email will bounce back to you with an error saying the domain does not accept mail.

This lookup is one of the reasons a well-configured domain matters. If you own a domain and send email from it, you need your own DNS records set up correctly — not only the MX records for receiving, but also the authentication records for sending, which we will reach in step four. When SenderGun sets up a dedicated server, the SPF, DKIM, DMARC, rDNS and MX records are configured for you as part of the setup.

Step 3: The two servers talk

Now your SMTP server connects to the recipient's mail server, and the two servers hold a short conversation. It follows a fixed script, and every mail server in the world follows the same one. In plain words, it goes like this.

First, your server says hello and introduces itself by name. This greeting is called EHLO, and it includes your server's hostname — one reason your server needs a proper hostname and a matching rDNS record, so the other side can verify who you are. Then your server says who the email is from. Then it says who the email is for. Then it sends the message itself: the subject, the text, any attachments. Finally, it says goodbye and closes the connection.

The receiving server answers at each step. It can accept the message, refuse it, or ask your server to try again later. Each answer is a short code. A code starting with 2 means success — the message was accepted. A code starting with 4 means a temporary problem — try again later. A code starting with 5 means a permanent problem — do not try again, the message will never be accepted. Your SMTP server logs every one of these answers, and that log is what delivery reports are built from.

Step 4: The trust checks — SPF, DKIM, DMARC and reputation

Accepting the message is not the same as delivering it to the inbox. Before the recipient ever sees your email, the receiving server runs its checks. This is the step where most delivery problems happen.

First, it checks SPF. SPF is a record in your domain's DNS that lists which servers are allowed to send email for your domain. The receiving server compares the IP address your email came from against that list. If the IP is not on the list, the email looks forged, and it is far more likely to be rejected or sent to spam.

Second, it checks DKIM. DKIM is a digital signature added to your email by your sending server. The receiving server verifies the signature against a public key in your DNS. If the signature is valid, the receiving server knows the message was really sent by you and was not altered on the way.

Third, it checks DMARC. DMARC is a policy you publish in DNS that tells receiving servers what to do when SPF or DKIM checks fail — deliver the message anyway, send it to spam, or reject it outright. It also tells the receiving server to send you reports about who is sending mail as your domain, which is how you spot someone impersonating you.

Fourth, it checks your sender reputation. The receiving server looks at the history of your IP addresses and your domain: have you sent spam before, have people complained about your mail, are your addresses on a blacklist? SenderGun works to a Sender Score target above 90 out of 100, because a strong reputation is what keeps the inbox door open. New IP addresses have no reputation at all, which is why they need to be warmed up gradually — sending a little at first, then more as the big mailbox providers learn to trust them.

There is also a fifth check, rDNS, or reverse DNS. This confirms that your IP address points back to your server's hostname. If rDNS is missing or does not match, many receiving servers will refuse your mail outright. It is a small record, and it is easy to forget — which is why it is included in a proper setup.

Step 5: Delivery, queues and retries

If the message passes the checks, the receiving server places it in the recipient's mailbox, and the journey is over. But delivery does not always happen on the first try. Mail servers are busy, inboxes fill up, and some servers deliberately delay unknown senders for a few minutes to see if they are real — a technique called greylisting.

When a receiving server answers with a temporary failure, your SMTP server does not give up. It puts the message in a queue and tries again later — usually after a few minutes, then after a longer gap, and so on. A good mail server retries for a day or more before giving up. This retry system is one of the most underrated parts of SMTP: it is why a short outage at the receiving end does not mean your emails are lost.

Only when the message truly cannot be delivered does your server give up and send you a bounce. The bounce message explains the reason — an address that does not exist, a domain that does not accept mail, a message that was blocked. Reading bounces is how you keep your list clean: addresses that hard-bounce should be removed, because sending to them again and again damages your reputation.

Step 6: Inbox or spam folder

Even after the message is accepted, one decision remains: inbox or spam folder? The receiving server's filters make this call based on everything it knows — your authentication, your reputation, the content of the message, and how the recipient has treated your mail in the past.

Engagement matters here. If recipients open your emails, reply to them, and move them out of spam, the filters learn to trust you. If recipients delete your emails without opening them, or mark them as spam, the filters learn the opposite. This is why sending only to people who asked to hear from you is the single most important habit in email marketing. A bought list, or a list of people who never opted in, will hurt your deliverability no matter how good your server is.

Content matters too. A message that looks like a scam — shouting capitals, suspicious links, a mismatch between the sender name and the sending domain — will be filtered more harshly. Keep your emails clean, honest and consistent with your brand, and make sure your sender name and address are recognisable to your readers.

What happens when something goes wrong

Here is a quick guide to the failures you are most likely to see, and what they mean.

  • Hard bounce: the address does not exist, or the domain does not accept mail. Remove the address from your list and do not send to it again.
  • Soft bounce: a temporary problem — a full inbox, a busy server, a message that is too large. Your server retries automatically. Only act if the same address keeps soft-bouncing.
  • Blocked: the receiving server refused your mail, usually because of reputation, a missing authentication record, or a blacklist. Check your SPF, DKIM, DMARC and rDNS, and check whether your IP is listed anywhere.
  • Spam folder: the message was delivered but filtered. Check authentication first, then look at engagement and content.
  • Delayed: the message is sitting in the queue because the receiving server asked your server to retry. This is normal and usually resolves itself within minutes or hours.

When several of these appear at once, start with authentication and reputation. In our experience, those two causes sit behind most delivery problems, and they are both fixable — which brings us to the next point.

Why this matters for bulk mailing

Everything in this guide applies to a single email. Now imagine sending thousands of them at once. The journey is the same, but the scale changes the rules.

First, receiving servers limit how many connections they accept from one IP address at a time, and how many messages they accept per minute. A bulk sender that ignores those limits gets throttled or blocked. A proper bulk mail server manages this with queues and per-provider limits, sending at a pace each receiving server is happy with. Second, a sudden flood of mail from a brand-new IP address looks exactly like spam, which is why IP warm-up exists: new IPs start with small volumes and grow gradually, so the big mailbox providers build trust over time instead of blocking you on day one.

Third, volume makes feedback essential. When you send a handful of emails, you notice a bounce. When you send a hundred thousand, you need reports, bounce handling and complaint feedback loops, so bad addresses are removed automatically and problems are spotted before they become a block. That is the job of a dedicated bulk SMTP server: not just sending, but sending at scale, at the right pace, with the right reputation, and with the reports to prove it.

SenderGun's dedicated plans are built for exactly this. The Basic plan handles 100,000 emails a day with 10 IPs, and the plans scale up to the Business plan at 2,000,000 emails a day with 200 IPs. Servers run on Xeon processors with 8 to 256 GB of RAM and 99.99% uptime, and every plan includes unlimited subscribers, authentication setup, a mail app, SMTP credentials and reports, with no setup or hidden fee. You can compare the plans on the pricing page, and the infrastructure page explains how the servers are built.

How SenderGun handles the journey for you

You do not need to manage any of this by hand. When you order a SenderGun dedicated SMTP server, the team configures the server, the mail software, and your authentication records, and warms up your IP addresses for you. You receive ready-to-use SMTP credentials — host, port, username and password — which you enter once in your app or website. After that, your app hands each email to your server, and your server takes care of the lookups, the conversations, the queues, the retries and the reports.

If you already run your own server and only need the mail software installed and tuned, the one-time SMTP setup service covers PowerMTA for $75, Exim for $70, or Postfix for $70, and the setup team handles the configuration. Either way, if something goes wrong later, you can write to support@sendergun.com and a real person will help you read the bounce messages and delivery reports to find the cause.

Final thoughts

Email feels instant, but it is a relay race: your app, your SMTP server, DNS, the recipient's server, and finally the inbox. Each handoff is a chance for something to go wrong — and each one is also a place where a good setup prevents the problem before it happens. Authentication, a clean reputation, warmed IPs and honest sending habits are what make the difference between an email that arrives and an email that disappears.

If your emails are getting lost, landing in spam, or bouncing in numbers you cannot explain, the journey above gives you a map for finding the fault. And if you would rather have the whole journey handled for you, talk to the SenderGun team — tell us your daily volume and your domain, and we will set up a server that carries your mail the whole way, from send to inbox.

← Back to Blog  ·  Get a server with warmed IPs →

Ready to reach the inbox — every time?

Tell us your daily volume and your domain. We configure the server, warm the IPs, set up SPF, DKIM, DMARC and rDNS, and hand you ready-to-use SMTP credentials.

Get a Free Quote →   See Pricing