High-Performance Email Delivery System
Scaled email delivery infrastructure to handle 1M+ scheduled emails with intelligent send-time optimisation, achieving several-fold increase in user engagement.
Skills Applied
The Challenge
iknow-uk, a growing accommodation listing platform, needed to scale their email marketing system to handle over a million scheduled emails while maximising user engagement. The existing standard email system couldn't handle the volume and sent emails at arbitrary times, resulting in poor open and click-through rates.
The Approach
I designed and built a custom email delivery engine from the ground up using PHP and MySQL, with direct SMTP server integration for maximum control and performance.
Key Technical Decisions
- Direct SMTP communication: Bypassed standard mail libraries to implement custom retry logic and dynamic throttling
- Intelligent send-time optimisation: Analysed historical user engagement data to determine the optimal delivery time for each subscriber
- Dynamic backoff: Implemented adaptive rate limiting that responded to SMTP server feedback and temporary issues
- Bounce tracking: Built comprehensive bounce handling and list hygiene automation
- Scalable architecture: Designed for horizontal scaling with queue-based processing
Implementation Highlights
- Custom PHP mailer with direct socket-level SMTP control
- MySQL-backed queue system with priority scheduling
- Per-user engagement tracking and send-time prediction
- Real-time monitoring and alerting dashboard
- Automated retry and error recovery mechanisms
The Outcome
The system transformed iknow-uk's email marketing effectiveness:
- 50,000+ emails per hour sustained throughput with room to scale further
- 100% uptime over 6 years of continuous operation before company acquisition
- Several-fold increase in accommodation enquiries compared to the previous system
- Intelligent delivery: Each subscriber received emails at their personally optimal time based on past behaviour
The system ran flawlessly from deployment through iknow-uk's acquisition by Snaptrip, handling millions of emails and directly contributing to the company's growth and eventual exit.
Technical Stack
- Backend: PHP (custom SMTP implementation)
- Database: MySQL (queue management, user tracking, analytics)
- Infrastructure: Linux servers with Apache
- Monitoring: Custom dashboards and alerting
Lessons Learned
- Measure user behaviour: The send-time optimisation feature delivered outsized impact by using actual engagement data
- Build for reliability: The 6-year zero-downtime run proved the value of thorough error handling and monitoring
- Know when to build: A custom solution was justified here because standard tools couldn't deliver the performance and intelligence required
Facing a similar challenge?
I'm always happy to compare notes or act as a sounding board — feel free to get in touch.
Connect on LinkedIn