Hyvor Relay is an open-source, self-hosted email API designed for developers who need full control over their email infrastructure. It provides a modern alternative to commercial services like Amazon SES, Mailgun, and SendGrid by leveraging SMTP with built-in features for deliverability, observability, and scalability. Built with PHP (Symfony), Go, and SvelteKit, it supports multi-tenancy and project isolation, making it ideal for agencies, SaaS platforms, and organizations managing high-volume email workflows. The system automates DNS management, bounce handling, greylisting, and feedback loops—reducing operational overhead while maintaining transparency and control over email delivery.
What You Get
- Self-Hosted Deployment - Deploy using Docker Compose or Swarm with full control over infrastructure; no vendor lock-in.
- Email API - Send emails via a RESTful API with simple HTTP requests, eliminating the need for direct SMTP integration.
- Logs & SMTP Conversations - View detailed send logs and full SMTP conversations for every email sent, retained up to 30 days.
- Multi-Tenancy & Project Management - Isolate email traffic across tenants and projects with scoped access controls for teams or clients.
- Queues for Email Types - Separate transactional and distributional emails into distinct queues to protect IP reputation.
- Greylisting & Automatic Retries - Handle temporary delivery failures intelligently without manual intervention.
- Bounce & Suppression Management - Automatically detect and suppress emails to bounced or unsubscribed addresses.
- Feedback Loop Integration - Receive and process spam complaints from major providers like Gmail, Yahoo, and Outlook.
- DNS Automation - Use the built-in DNS server to automatically manage SPF, DKIM, DMARC, and MX records without manual configuration.
- Webhooks - Receive HTTP callbacks for email events such as send, open, click, bounce, and complaint.
- Observability - Monitor performance with Prometheus metrics and pre-built Grafana dashboards; view real-time logs.
- Easy Scaling - Add more servers and dedicated IPs as volume grows, with support for distributed email workers.
Common Use Cases
- Building a multi-tenant SaaS platform - Send branded emails to each tenant’s users while keeping data and IPs isolated using Hyvor Relay’s multi-tenancy features.
- Managing high-volume transactional emails - Automate order confirmations, password resets, and notifications with queue separation to prevent reputation damage from bulk sends.
- Problem: Unreliable email delivery due to shared IPs → Solution: Hyvor Relay - Organizations using third-party APIs face deliverability issues from other users’ spam; self-hosting with dedicated IP support ensures consistent inbox placement.
- Team workflows for agencies - DevOps and engineering teams manage email infrastructure for multiple clients from a single dashboard with project-scoped access and audit trails.
Under The Hood
Hyvor Relay is a comprehensive email delivery and management platform that integrates modern backend, frontend, and worker technologies to provide a robust solution for sending and tracking emails. It combines Symfony-based APIs with a SvelteKit-powered UI and Go-based background processing, emphasizing modularity and extensibility.
Architecture
This system adopts a modular monolithic architecture with distinct layers for backend, frontend, and worker components.
- The backend is built using Symfony with FrankenPHP, enabling modern PHP practices and database-driven persistence
- The frontend is developed with SvelteKit for a responsive, static-adapted user interface
- A Go-based worker component handles background tasks, ensuring separation of concerns and performance optimization
- The system supports extensibility through Symfony bundles and Prometheus-based metrics for monitoring
Tech Stack
The project leverages a multi-language, polyglot approach to deliver a full-stack email solution.
- The backend is powered by PHP with Symfony, while the frontend uses SvelteKit and Vite for a dynamic UI
- Key backend dependencies include Doctrine, Symfony CLI, and various Symfony bundles for caching and routing
- The system uses Docker for containerization, Caddy as a reverse proxy, and Vite for frontend builds
- Testing is handled via PHPUnit and Dama\DoctrineTestBundle on the backend, with ESLint and Prettier for frontend code quality
Code Quality
Code quality in Hyvor Relay reflects a moderate level of organization and structured practices.
- Error handling is implemented with clear patterns in both backend and frontend components
- The codebase includes linting configurations and CI/CD pipelines for consistency and automation
- API documentation is comprehensive, supporting developer onboarding and maintenance
- Test coverage remains limited, with some inconsistency in code style and organizational patterns
What Makes It Unique
Hyvor Relay distinguishes itself through its multi-language architecture and thoughtful integration of modern tools.
- The combination of Symfony, SvelteKit, and Go enables a clean separation between API logic, UI rendering, and background processing
- It introduces idempotency and rate-limiting strategies to ensure reliable email delivery
- The system emphasizes extensibility via Symfony bundles and Prometheus metrics for observability
- Its modular design allows for scalable integration with other services and custom domain logic