Mastering Email Delivery in SHONiR CMS — Guide to Multiple SMTP Servers, Relay Limits & Smart Failover
Source: Dev.to

Hi everyone,
I wanted to share a detailed guide I just published on email delivery in SHONiR CMS — a modern Content Management System built on the CodeIgniter 4 framework.
SHONiR CMS includes a powerful Mail Servers management system that lets you configure multiple SMTP servers with relay limits and automatic failover. This means you can add SMTP providers like Gmail, Yahoo, Hotmail, Brevo (Sendinblue), SendPulse, or your own mail servers — and SHONiR CMS will use them intelligently for sending notification, transactional, and bulk emails.
🔗 Read the full guide here:
mastering-email-delivery-in-shonir-cms-a-guide-to-adding-multiple-smtp-servers-with-relay-limits-smart-failover.html
What’s covered in the article
Why multiple SMTP servers are useful
- Improves reliability and load balancing
- Helps avoid hitting provider relay limits
- Provides fallback in case a provider experiences downtime
How SHONiR CMS chooses a random SMTP for delivery
- Selects an available server based on configured priority and current usage
- Randomization reduces the chance of over‑using a single provider
Detailed Brevo SMTP setup (API & SMTP key, domain verification)
- Steps to obtain API/SMTP credentials from Brevo
- Domain verification process to improve deliverability
Step‑by‑step admin panel setup in SHONiR CMS
- Navigate to Mail Servers in the admin dashboard
- Add a new SMTP configuration (host, port, encryption, credentials)
- Set Priority, Relay Limit, and Reset Type (daily, hourly, etc.)
- Save and test the connection
Priority, encryption, relay limits & reset type
- Priority: Determines the order of server selection
- Encryption: TLS/SSL options for secure transmission
- Relay Limits: Maximum emails per reset period to stay within provider quotas
- Reset Type: Defines when the relay counter resets (e.g., daily at midnight)
Automatic retry system with failover
- Up to 12 retries per email
- Retry intervals between 5–15 seconds
- If a server fails, the system automatically switches to the next available server
Real‑world example scenarios
- Burst traffic: Distribute bulk newsletters across several providers
- Provider outage: Seamlessly continue sending via backup servers
- Quota management: Rotate servers to stay under daily limits
Benefits
- Reliability: Reduces single‑point failures
- Load balancing: Evenly spreads email volume
- Avoidance of email loss: Automatic retries and failover ensure messages are delivered
Why this matters for CodeIgniter developers
If you’re building applications that rely on email notifications — order alerts, user registrations, newsletter delivery — having a robust email delivery system is essential. SHONiR CMS simplifies this by abstracting SMTP server management and handling smart retries and failovers internally.
Questions for the community
- Has anyone implemented a similar multi‑SMTP system in CodeIgniter?
- What are best practices for handling SMTP relay limits across providers?
- Any recommendations for monitoring or logging email delivery success/failures in CodeIgniter?
Looking forward to feedback, ideas, and improvements from experienced developers here!
Thanks! 🚀