Skip to content

How Temp Mail Works: Following One Message From Send to Deletion

Take one message. A made-up shop, Bright Parcel, has just had a visitor sign up with the address quietfox42@veylax.com, and its system presses the equivalent of Send on a confirmation email. A little later that message is on the visitor's screen, and a day after that it no longer exists anywhere on the inbox service. This article follows it the whole way.

So how does temp mail work? It uses the ordinary machinery of internet mail with one twist: the receiving side accepts mail for any username on its domains and keeps it only briefly. The sender's server looks up the domain's MX record in DNS, connects to the listed host over SMTP on port 25, and delivers the message. The temp mail system then parses it, shows it in an inbox, and deletes it on a schedule. On VookMail, the domains' MX records point to our own mail server, which receives the SMTP session and passes each message to the site over HTTPS.

Stage 1: Leaving the sender

Bright Parcel's application builds the message. A message is structured text, laid out according to the Internet Message Format (RFC 5322): headers such as From, To and Subject, then a blank line, then the body. The application does not usually deliver it directly. It hands it to an outgoing mail service, either over an authenticated SMTP connection on port 587 (or 465 with TLS from the start) or through the sending company's web API.

The first delay can happen right here. Many applications put outgoing mail into a job queue and work through it in batches, particularly marketing platforms. So the moment a website says "check your email" may be some way ahead of the moment the mail leaves. In our example, say the queue takes twenty seconds. Nothing has reached the recipient's side yet, and no temp mail service can see it or speed it up.

Stage 2: Finding out where veylax.com takes its mail

The outgoing server reads the part after the @, in this case veylax.com, and asks DNS for that domain's MX records. An MX (mail exchanger) record names a server that accepts mail for the domain. In zone-file notation, here is how a domain's records might look. The names are invented for illustration:

example-temp.com. 3600 IN MX 10 mx1.mail-provider.example.
example-temp.com. 3600 IN MX 20 mx2.mail-provider.example.

The 3600 is the TTL (time to live), the number of seconds a resolver may cache this answer. The 10 and 20 are preferences: senders try the lowest number first and fall back to the higher one if it cannot be reached. The hostname must have its own A (IPv4) or AAAA (IPv6) record. An MX record should point to a hostname, and not directly to an IP address or to a CNAME alias.

You can run this lookup yourself for any domain:

SystemCommand
Windows Command Promptnslookup -type=mx example.com
Windows PowerShellResolve-DnsName example.com -Type MX
macOS and Linuxdig MX example.com +short

Anti-abuse systems use this same lookup to spot domains that route mail to known disposable infrastructure. That is one reason some websites recognise temp mail domains even when the domain itself is new.

Two edge cases in DNS

A domain with no MX record is not automatically unreachable. RFC 5321, the SMTP standard, defines a fallback: the sender may treat the domain's own A or AAAA record as an implied mail host. A domain that wants no mail at all can say so with a null MX (RFC 7505), which is an MX record with preference 0 and a single dot as the host. Temp mail domains publish normal MX records, of course, since receiving is their whole purpose.

Caching can also get in the way when a service adds a domain. Resolvers that recently got a "no such record" answer may keep it until the negative cache time runs out, as controlled by the domain's SOA record (RFC 2308). A brand new domain may therefore take a while to receive reliably from every sender.

Stage 3: The conversation between two servers

Bright Parcel's outgoing server now opens a TCP connection to the preferred MX host on port 25. SMTP is a text protocol: the client sends commands and the server answers with numbered replies. Here is a simplified session for our message, in which S: is the receiver and C: is the sender. The hosts and the size figure belong to this invented example.

S: 220 mx1.mail-provider.example ESMTP ready
C: EHLO out.brightparcel.example
S: 250-mx1.mail-provider.example
S: 250-STARTTLS
S: 250 SIZE 26214400
C: STARTTLS
S: 220 Ready to start TLS
(TLS handshake, then EHLO again)
C: MAIL FROM:<bounce@brightparcel.example>
S: 250 OK
C: RCPT TO:<quietfox42@veylax.com>
S: 250 OK
C: DATA
S: 354 End data with <CR><LF>.<CR><LF>
C: (headers, blank line, body, then a line with a single dot)
S: 250 Queued as 8F2A1C
C: QUIT
S: 221 Bye

CommandPurposeWhat it means for temp mail
EHLOIdentifies the sender and asks what the server supportsThe reply lists extensions such as STARTTLS and the maximum SIZE
STARTTLSUpgrades the connection to TLS (RFC 3207)Protects this one hop. It is not end-to-end encryption
MAIL FROMSets the envelope sender, where bounces goOften differs from the visible From line, particularly for bulk senders
RCPT TONames a recipientA catch-all receiver answers 250 for any username on its domains
DATAStarts the message contentEnds with a single dot on its own line
QUITCloses the sessionDelivery was already settled by the 250 after DATA

The moment responsibility changes hands

That final 250 is the most important line in the session. Until then, the message belongs to Bright Parcel's server, and if the connection drops it tries again. After that, the receiver has accepted responsibility. The sender's dashboard will now typically say "delivered", which only means this hop succeeded. It does not mean a person saw anything.

The reply codes explain a good deal of the behaviour people see:

  • 2xx is success, and 250 means accepted.
  • 3xx is an intermediate step, and 354 tells the sender to transmit the message.
  • 4xx is a temporary failure, for example 421 or 451. The sender keeps the message in its queue and retries.
  • 5xx is a permanent failure, for example 550 (mailbox unavailable or rejected) or 552 (too large). The sender gives up and usually generates a bounce message.

The difference between 4xx and 5xx explains most "slow" mail. Had the receiver answered 451 at this point, perhaps because of greylisting (RFC 6647), our message would be sitting in Bright Parcel's queue, neither lost nor delivered. RFC 5321 advises a retry interval of generally at least 30 minutes and a give-up time of at least four to five days, although real systems set their own schedules, and many retry sooner. That is why one confirmation can appear after a few seconds and the next after twenty minutes, with nothing wrong in either case.

Two sets of addresses

SMTP has two layers of addressing. The envelope, MAIL FROM and RCPT TO, is what servers use for routing. The headers, From:, To: and Subject:, are part of the message content and are what you see on screen. They can differ. A newsletter might display To: subscribers although the envelope recipient was your temporary address. A receiving system therefore files messages by envelope recipient, the dependable value. It is also why the Return-Path header, added at final delivery, records the envelope sender rather than the visible From address.

Stage 4: Why quietfox42 did not have to exist

At RCPT TO, a normal mail server checks whether the mailbox exists and answers 550 if it does not. A temp mail domain works the other way around. It runs as a catch-all, or wildcard, receiver: every local part (the bit before the @) is accepted.

That single choice is what makes instant addresses possible. When VookMail shows you a random address, nothing had to be created on any mail server. When you press New, type your own username, pick a domain and press the arrow, that name already "exists", because the domain accepts all names. The application only has to show you the messages whose recipient matches the address on your screen.

Two small rules apply to those names. The standard says a local part may be case-sensitive, but nearly all real systems treat Test@ and test@ as one mailbox, so a temp mail system sensibly normalises case to stop a sender's capitalisation from splitting an inbox in two. And RFC 5321 limits the local part to 64 octets, with a practical limit of 254 characters for a whole address, so generated names should stay well inside that.

Stage 5: From mail protocol to web request

Our message has now been accepted by a machine that speaks SMTP. The website that shows the inbox is a web application. Something has to connect the two.

Running a mail server that faces the whole internet is real work: TLS, connection floods, queues, malware, and keeping up a good reputation. So many modern applications hand the SMTP side to a specialised inbound provider and receive messages as web requests, a pattern often called an inbound parse webhook. VookMail uses this model. It works like this:

  1. The provider's MX hosts accept the message from the sender's server, as in the session above.
  2. The provider packages it, either as raw MIME source or as already-parsed fields such as sender, recipients, subject, text, HTML and attachments.
  3. It sends that package in an HTTPS POST to an endpoint run by the temp mail application, which encrypts the content between those two points.
  4. The application answers with a success status. If it is unreachable or returns an error, a well-behaved provider retries according to its own policy.
  5. The application validates the request, matches the recipient to an address and stores the message temporarily.
ConcernSelf-hosted SMTP receiverInbound provider plus HTTPS
ExposurePort 25 open to every host on the internetProvider takes the SMTP traffic, and the app sees only HTTPS requests
Spikes in trafficThe operator must provision capacityThe provider's infrastructure handles bursts
MIME parsingThe operator writes or maintains a parserOften done by the provider, though raw source can still be used
Fit with a web appNeeds a bridge from mail spool to appThe message arrives like any API request
DependencyFewer outside partiesRelies on the provider's availability and configuration

The last row is a real cost. If an inbound provider has an outage or a configuration problem, delivery to every domain behind it can stop until that is fixed, even while the temp mail website itself runs normally. Messages refused with a temporary error during that time may still get through when the original senders retry, depending on how long their queues hold them.

Protecting the endpoint

A webhook endpoint is a public URL, so anyone could try to post a forged message to it. Careful implementations commonly combine several defences:

  • Signature verification, where the provider signs each request and the application rejects those that do not match.
  • A secret path or token known only to the provider and the application.
  • Restricting requests to the provider's published address ranges, where these exist.
  • Size limits, which reject oversized payloads early to protect memory and storage.
  • Idempotency. Providers retry, so the same message may arrive twice, and a Message-ID or provider event ID prevents duplicates.

Stage 6: Taking the message apart

What arrives is not yet something a person can read comfortably. MIME (Multipurpose Internet Mail Extensions, RFC 2045 onwards) lets one message carry several parts in different formats. Our confirmation email might be arranged like this, with an invoice added as an example:

PartWhat it holds
multipart/mixedThe outer container when attachments are present
multipart/alternativeThe same content twice, as text/plain and text/html. The reader shows the richest form it supports
multipart/relatedHTML grouped with inline images, referenced by cid: identifiers
Attachment partA Content-Disposition: attachment header and a filename, then the file's encoded data

Above those sit the headers, including Message-ID, Date and the Received trace lines, which record every server the message passed through. If you ever want to know where a delay happened, the timestamps in the Received lines are the place to look.

A parser also has to reverse several encodings. Base64 carries binary attachments and inflates them by about a third, so a 10 MB file becomes a message of roughly 13 to 14 MB. Quoted-printable handles mostly-ASCII text by writing special characters as =XX. The charset= value says how text is encoded, commonly UTF-8, which matters a lot for a service used in many languages. And subject lines with non-ASCII characters use the =?UTF-8?B?...?= or =?UTF-8?Q?...?= syntax from RFC 2047.

Making the HTML safe to show

Email HTML is written by strangers, so a viewer must not let it run code in the context of the website. Careful implementations generally remove scripts, event handler attributes and dangerous URL schemes, and display the message in an isolated frame so that its styles and content cannot affect the surrounding page.

Remote images need thought too. Loading one tells its sender that the message was opened, which is how tracking pixels work. VookMail removes hidden tracking pixels and keeps images off until you allow them.

A viewer can also do something useful with the parsed text. For our confirmation message, VookMail shows the verification code or confirmation link above the message, so nobody has to scroll through a long template to find it.

Attachments

Attachments are decoded and stored temporarily so they can be downloaded. On VookMail, common program files such as .exe, .bat and .apk are refused, archives such as .zip show a caution, and maximum sizes apply. Attachments are deleted along with the messages. Remember that a file's safety has nothing to do with where it was stored: a macro-enabled document is just as dangerous when downloaded from a temporary inbox.

Stage 7: Reaching the screen

Our message is now stored, but the browser showing quietfox42@veylax.com does not know that yet. Web applications have several ways of finding out:

TechniqueHow it worksTrade-offs
Short pollingThe page asks the server every few secondsSimple and dependable, but makes repeated requests
Long pollingA request stays open until there is news or a timeoutFewer empty answers, more open connections
Server-Sent EventsOne long-lived stream from server to browserEfficient in one direction, reconnects by itself
WebSocketsA persistent two-way connectionFully interactive, needs dedicated infrastructure

VookMail's inbox checks for mail every few seconds, and the Refresh button checks by hand, for example after your device has been asleep or your network dropped. Those few seconds are usually the shortest leg of the journey. If mail seems slow, the time has almost always gone somewhere earlier, in the sender's queue or a retry.

Creating an address also passes through a small piece of bot protection: a short calculation in the visitor's browser, known as proof of work. It costs a normal visitor almost nothing, and it makes creating addresses in bulk more expensive.

The inbox can be opened elsewhere as well, with a step in between. On VookMail, creating an address gives that browser a key, and while a browser has the inbox open, nobody else can open it. About 2 minutes after nobody has it open, anyone who types the address opens it and gets a key of their own. The QR button gives a one-time link, shown as a code a phone can scan within 10 minutes, and it opens the same inbox even while it is open elsewhere. The Android and Huawei apps show mail in the same way. On many other services anyone who knows or guesses an address can open that inbox at any time. A random address is the safer choice, because the generator never gives out an address that has been used before, while anyone can type a common name.

Stage 8: Deletion

About a day after our confirmation arrived, it goes. Retention in a temp mail system is usually implemented with a timestamp on each stored message and a scheduled job that removes anything older than the limit. Attachments held as separate files go at the same time. Other designs use storage-level expiry, where the database itself removes old records through a time-to-live setting. Batch jobs are one reason services tend to describe expiry as "about" a day, since the exact moment depends on when the job runs. On VookMail, messages, attachments and addresses are deleted within about 24 hours, and the Delete button lets you remove things sooner.

Short retention serves two purposes at once. It protects privacy, and it is also a capacity necessity: disposable inboxes receive a lot of marketing mail, and keeping it for long would serve nobody. Our privacy policy and methodology page cover data handling in more detail.

Note what deletion does not touch. Bright Parcel still has the address in its customer table, and its logs still show that it was "delivered". All that has gone is the copy on the inbox side.

The whole route on one table

StageComponentProtocol or mechanismTypical port or format
CompositionApp or mail clientRFC 5322 message, MIMEText with headers and parts
SubmissionSender's mail serviceSMTP submission or sending API587 or 465
Routing lookupDNS resolverMX, then A or AAAA queriesDNS, port 53
RelaySender's server to recipient's MXSMTP with opportunistic STARTTLS25
Inbound receptionOur mail serverCatch-all acceptance for the domainsReplies 250, 4xx, 5xx
ForwardingProvider to VookMailHTTPS request443
ProcessingTemp mail applicationMIME parsing, sanitising, storageDatabase and file storage
DisplayBrowser or mobile appChecks every few seconds, plus manual RefreshHTTPS
ExpiryScheduled cleanupRetention ruleAbout a day on VookMail

Where SPF, DKIM and DMARC come in

These three get mentioned in nearly every discussion of email, so it helps to be precise about where they sit on this route. All of them concern proving who sent a message. None of them decides whether a temporary address can receive it.

SPF (RFC 7208) is a DNS TXT record listing the servers allowed to send using a domain in the envelope sender, and receivers compare the connecting IP against it. DKIM (RFC 6376) is a cryptographic signature that the sending domain adds to selected headers and the body, verified using a public key in DNS. DMARC (RFC 7489) is a policy telling receivers what to do when a message fails SPF and DKIM alignment with the visible From domain, and where to send reports.

For our message, these checks happen around Stage 3. Bright Parcel's server was checked against its SPF record, and its DKIM signature can be verified using its published key. The receiving provider can use those results to flag spoofing. Forwarding complicates things a little: a DKIM signature survives as long as the message is not modified, while an SPF result relates only to the last connecting server. When mail is relayed, ARC (Authenticated Received Chain, RFC 8617) can record earlier results. In the end, though, it is the MX record and the receiver's acceptance that get the message delivered.

When a message never turns up

Every stage above is somewhere a message can stop. Working from the sender's end usually finds the problem fastest.

StageWhat went wrongWhat you see or do
Before sendingA typo in the addressThe mail went elsewhere or bounced. Use the Copy button
Leaving the senderThe message is queued, or batches are slowA minute or two is normal for some services. Wait
Leaving the senderThe site quietly skips disposable domainsNothing arrives. Respect that and use a permanent address or alias there
SMTPA 4xx reply and a later retryThe message arrives after a delay that could be minutes or more
SMTPThe message exceeds the size limitA 552 rejection and a bounce to the sender
Inbound providerAn outage or DNS problemDelivery to all domains may pause until it is resolved
InboxThe window has passed, or the address was deletedThe message arrives too late to be seen

Reading a failure when you own the sending side

If you are testing your own application, you can see much more than a user can, and our guide to temporary email for developers goes further into test design. A sensible order of checks:

  1. Open your application's mail logs or your sending provider's dashboard. Was the message accepted, and what final status does it show?
  2. Look for bounces or webhook events reporting a 5xx from the recipient's side. The text after the code often names the reason.
  3. Resolve the recipient domain's MX records from your server's network, using the commands above. A resolver problem there may not show up anywhere else.
  4. Confirm that your sending domain has SPF, DKIM and DMARC configured, because some receivers treat unauthenticated mail with suspicion.
  5. Send a small plain-text message to rule out size or content filtering.
  6. Use a distinct username per test so you know which run produced which message.

If a message reaches the inbox late, read its Received headers from the bottom up. A long gap between two timestamps shows which hop held it, allowing for any difference between those servers' clocks.

Why run many domains?

VookMail lets you choose from more than 30 domains. There are practical reasons for that. Testers can separate projects or test suites by domain. If one domain has a DNS or delivery problem, the others may still work. And there is less reliance on a single name, which helps when sending systems judge recipient domains as well as senders.

Multiple domains are not a tool for getting around websites that deliberately refuse disposable addresses. If a service rejects a temp mail domain, it is signalling that it wants a permanent contact, and the right choice is your real address or a permanent alias for that service. The refusal may come at the form, through a domain list or an MX lookup like the one in Stage 2, or later, when the sender declines to send.

What the route tells you about security

Having followed the message, you can see exactly how far each protection reaches.

Encryption is applied hop by hop. STARTTLS protects each server-to-server leg when both sides support it, and it is often opportunistic, so a connection may fall back to plain text unless a policy such as MTA-STS (RFC 8461) requires otherwise. HTTPS protects the forwarding and viewing legs. None of this is end-to-end encryption: every system that handles the message can read it.

Access is the other half. There is no password, and anyone who knows the address can open the inbox once nobody has it open, so the address is not a secret. The mail is also not end-to-end encrypted, so never let anything confidential be sent there. Short retention limits the damage from any exposure, but it also means the inbox cannot serve as a record. And since content is untrusted, phishing and malware can arrive in this inbox as in any other. A temporary inbox protects your real address, and it does little for your device if you open a bad file. Appropriate uses are privacy, spam control and testing, as our terms and conditions set out, and important accounts belong elsewhere.

What this looks like on VookMail

All of the machinery above is in place before you arrive. When you open VookMail, an address is ready. You can press New to type a username and pick a domain, or use the yellow shuffle button described in our guide to using VookMail. There is nothing to register, because the domain already accepts every name. When a sender delivers mail, the provider behind the MX records receives it over SMTP and forwards it over HTTPS, and it appears in your inbox with any attachments the next time the page checks. About a day later, it is gone.

The service is also available as an app on Google Play and Huawei AppGallery.

A few more technical questions

Which port does inbound email use?

Delivery between mail servers uses SMTP on TCP port 25. Ports 587 and 465 are for submitting outgoing mail to your own provider, so they appear at Stage 1 and not at Stage 3. That is also why a home connection that blocks port 25 can usually still send through its provider.

Can a temp mail service see my messages?

Technically, yes. The message reaches the service in readable form, because that is how it can show it to you, and the same goes for the mail server handling it on the way. This is true of ordinary hosted email too, unless the content is encrypted end to end. It is one more reason to keep anything sensitive out of a temporary inbox.

Why can the sender think a message was delivered when I see nothing?

Because "delivered" on a sender's dashboard refers to the 250 reply from the receiving server. Events after that point, such as the forwarding step or a late arrival after the inbox was cleared, are invisible to the sender.

Could a sender tell that my address is a catch-all?

Often. A verification tool can test a made-up username at the domain, and if the server accepts it, the domain is probably a catch-all. That by itself does not prove the domain is disposable, since many ordinary company domains are configured the same way, so such tools usually combine it with other signals.

Do replies to the message work?

Replies from your side are not the point of the design, since the inbox mainly receives. If you need a two-way exchange, a regular mailbox or an alias service that supports replies is the better fit.

For more on the product itself, see our FAQ. VookMail is part of the PAYATE network of free tools.