overtrue/easy-sms
overtrue/easy-sms is a PHP SMS component with one unified API for dozens of Chinese cloud providers. Configure multiple gateways, use built-in or custom rotation and failover strategies, auto-select an available provider, and get consistent responses for logging and monitoring. Easily add or remove...
overtrue/easy-sms as the commodity layer. It abstracts 30+ Chinese and regional SMS providers behind one send() call, so the team writes and maintains a single integration instead of per-provider HTTP clients, signing logic, and response parsing. A PM should assume "buy the abstraction, negotiate directly with the providers" rather than funding an in-house SMS gateway.OrderStrategy and pluggable strategy system let you send through ['aliyun', 'yunpian', 'juhe'] and fall through on failure — this is what makes an "SMS always arrives" SLA credible for OTP, order notifications, and transactional alerts. Roadmap items that depend on message delivery reliability can be committed against this.PhoneNumber with an international dialing code, plus dedicated Aliyun international and Chuanglan international configs, means "send OTPs to overseas users" is an incremental slice rather than a new subsystem.Overtrue\EasySms\Message lets each business event (order paid, verification code, refund) declare its own content, template ID, variables, and gateway preference in one place. This gives PMs a clean mapping from product events to customer-facing messages, and a single place to review copy and compliance wording.gateway, status, result/exception per provider) plus NoGatewayAvailableException::getResults()/getExceptions()/getLastException() is exactly the data a support team needs to answer "did the customer get their code?" and to attribute failures to a specific carrier.yl/easysms-notification-channel makes SMS a first-class Laravel Notification channel — worth evaluating before anyone proposes a bespoke notification microservice.Adopt when most of the following hold:
PHP >= 8.4, so confirm your runtime before committing — this is the single most likely adoption blocker on legacy Laravel apps.template + data.Dependents: 0, which likely understates real usage in the PHP ecosystem — verify with your own dependency audit rather than treating it as a signal either way.Look elsewhere when:
extend(), but at that point you are maintaining the abstraction for one provider — a thin direct client may be simpler.For executives — the one-paragraph version:
We can add reliable SMS delivery without building or operating an SMS platform. overtrue/easy-sms is a mature, MIT-licensed PHP library that puts 30+ SMS providers — including Aliyun, Tencent Cloud, Yunpian, and Chuanglan — behind a single, uniform interface, with built-in automatic failover across multiple providers and one consistent result format for logging and monitoring. The business consequence: one integration instead of many, provider outages that degrade gracefully instead of taking down OTP and order notifications, and the ability to switch or add carriers on commercial or regulatory grounds as a configuration change rather than an engineering project. Cost is limited to provider usage and a small integration effort — there is no licence fee.
For engineering — what you are actually adopting:
EasySms client, config-driven gateways, send($number, $message, $gateways = null) with per-send gateway overrides.OrderStrategy by default; strategies are pluggable, so cost- or region-aware routing is an extension point, not a rewrite.Message encapsulate content, template ID, variables, and gateway preference — this is the natural home for our notification catalog and keeps copy/compliance review in one place.content/template/data accept closures receiving the gateway, so provider-specific template IDs and wording are handled without branching in our domain code.NoGatewayAvailableException exposes getResults(), getExceptions(), getException($gateway), getLastException() — wire these into our logs and alerting from day one.extend() covers any provider not in the list; PhoneNumber handles international dialing codes.yl/easysms-notification-channel if we want SMS as a Laravel Notification channel.Decisions and caveats to put in front of stakeholders:
How can I help you explore Laravel packages today?