Definition
An email send queue is a data structure or service that holds messages waiting to be processed and delivered by the MTA. When a campaign is deployed or a transactional email is triggered, messages are placed in a queue and processed according to priority, rate, and ordering rules. The queue is the central coordination point between message generation (the application layer) and message delivery (the MTA layer). Its design directly impacts delivery speed, ordering, and the system's ability to handle volume spikes.
Queue prioritisation is the most critical queue management function for email operations. Transactional messages (password resets, order confirmations, account notifications) must be delivered ahead of marketing messages. A well-designed queue system supports multiple priority levels, with higher-priority messages processed first regardless of when they entered the queue. During high-volume marketing campaigns, the queue must continue to prioritise transactional messages even as the marketing queue backs up. The ratio of transactional to marketing queue processing is typically configured to maintain 80-90% of queue processing capacity for transactional messages during peak loads.
Batch processing logic within the queue determines how messages are grouped for delivery. Messages are typically batched by destination domain to maximise SMTP connection reuse. Sending 10,000 messages to Gmail addresses one at a time (10,000 separate connections) is dramatically less efficient than sending them in batches of 100 per connection (100 connections). The queue must also manage deferred delivery: messages that receive temporary failure responses (4xx codes) are moved to a deferred queue and retried according to configurable retry schedules. A well-designed deferred queue prevents a single ISP outage from blocking delivery to all other ISPs.
Best Practices
Implement at least three priority queues: transactional, transactional-triggered marketing, and broadcast marketing. Transactional messages (highest priority) should be processed immediately with minimal batching delay. Transactional-triggered marketing (abandoned cart, welcome emails) should have moderate priority with a 1-5 minute batching window. Broadcast marketing (promotional campaigns) should have lowest priority with configurable batching and rate limiting.
Set maximum queue depths and implement back-pressure mechanisms. A queue that grows unboundedly during a peak send will eventually exhaust system memory and fail. Configure maximum queue depths per priority level. When a queue reaches its limit, apply back-pressure: slow down message acceptance from the application layer rather than allowing unbounded queue growth. This protects system stability.
Monitor queue age (time messages have been waiting) as a key operational metric. Queue age should be near-zero for transactional queues. Marketing queue age is expected to increase during campaign deployments but should return to near-zero within 1-3 hours of campaign completion. Alert if any queue age exceeds 2x its expected maximum. Persistent elevated queue age indicates throughput or capacity problems.
Implement separate deferred message queues per destination ISP. If Gmail is experiencing a slowdown and generating many deferral responses, the deferred queue should hold those messages without affecting delivery to Outlook, Yahoo, or other ISPs. Per-ISP deferred queues prevent a single provider issue from cascading across all delivery.
Design queues for persistence and recoverability. Queue data should be stored in a persistent data store (database or disk-based message queue), not only in memory. In the event of a system restart, the queue should recover and continue processing from where it left off. Loss of queued messages due to system failure is a serious operational incident that can result in significant revenue loss.
Related Glossary Terms
Email Bandwidth
Email sending bandwidth and throughput refer to the rate at which emails can be delivered, typically 100-500 emails/second per IP. Bandwidth planning ensures campaigns complete within desired delivery windows.
Email BIMI VMC
BIMI Verified Mark Certificate (VMC) certifies brand logo ownership for display in supporting email clients. VMCs cost £1,500-2,000+ per year per logo and require DMARC reject or quarantine policy plus SVG logo format.
Email Blacklist
An email blacklist (DNSBL) is a real-time database of IP addresses or domains known for sending spam or unwanted email.
Email Bulkhead
Email bulkhead pattern isolates transactional emails from marketing sends using separate IPs, subdomains, and servers. This protects critical deliverability and prevents marketing issues from affecting essential transactional messages.
Email DANE
DANE (DNS-based Authentication of Named Entities) uses TLSA records to authenticate STARTTLS connections for SMTP, preventing TLS downgrade and man-in-the-middle attacks. It requires DNSSEC to function securely.
Email DKIM Selector
DKIM selector management involves rotating signing keys across named selectors (default, s1, s2, 2024). Multi-selector strategies allow zero-downtime key rotation every 6-12 months for ongoing email authentication.
Frequently Asked Questions
The email queue manages the flow of messages from generation to delivery, providing priority management, batching, rate limiting, and deferred delivery handling. Without a queue, the application layer would need to manage all these functions, leading to complexity, instability, and poor delivery performance.
By using separate queues or priority levels within a shared queue. Transactional queues are configured with the highest processing priority, ensuring they are processed ahead of marketing messages even when marketing volume is high. Effective priority mechanisms include weighted fair queuing (WFQ) or strict priority queuing with rate limits on lower-priority queues.
When the queue depth increases beyond normal levels, messages experience increasing delivery delay. Monitoring should alert on queue depth and age thresholds. If the queue continues to grow, the system may need more throughput capacity (more IPs, faster MTA) or the message generation rate may need to be reduced. Critical: transactional queue backup is a more serious incident than marketing queue backup.
Batching groups messages by destination domain, allowing the MTA to reuse SMTP connections for multiple messages. Establishing an SMTP connection involves a TCP handshake and protocol negotiation that takes 100-500ms. Sending 100 messages over a single connection saves 99 connection setups compared to sending individually. At high volumes, this efficiency gain is substantial.
A deferred queue holds messages that received temporary failure responses (4xx SMTP codes) from the receiving server. These messages should not block delivery of other messages but need to be retried according to a schedule. A dedicated deferred queue allows retries to happen in the background without blocking the main delivery queue.