1. Overview

WHMS integrates with the Laravel-BD-SMS package to send SMS messages through multiple Bangladeshi and international SMS providers. Administrators can send individual, bulk, or broadcast SMS from the admin panel. SMS is also triggered automatically for invoice events when enabled via settings.

2. Architecture

ComponentLocationPurpose
SmsServiceapp/Services/SmsService.phpCore service for sending single and bulk SMS via configured providers
SmsControllerapp/Http/Controllers/Admin/SmsController.phpAdmin interface for sending SMS and viewing logs
LogSentSms Listenerapp/Listeners/LogSentSms.phpLogs all SMS sends to ActivityLog
NotificationServiceapp/Services/NotificationService.phpSends automated SMS for invoice events when enabled

3. Supported SMS Providers

#Provider#Provider
1SSL Commerz10QuickSms
2BoomCast11Muthofun
3DianaHost12GreenWeb
4Metronet13Infobip
5MimSms14ElitBuzz
6Alpha15Brilliant
7Banglalink16Tense
8Grameenphone17SMSNoc / BulkSmsBD
9OnnoRokom
The default provider is configured via config('sms.default_provider'). Provider API credentials are set in the config/sms.php configuration file.

4. Admin SMS Features

4.1 Sending Modes

ModeDescription
SingleSend to one phone number
MultipleSend to multiple numbers (comma or newline separated)
All ClientsBroadcast to all clients with phone numbers

4.2 Admin Routes

RouteMethodDescription
/admin/smsGETSMS send form with provider selection and client list
/admin/sms/sendPOSTProcess and send SMS
/admin/sms/logsGETView SMS delivery logs

5. Automated SMS for Invoice Events

When enabled via settings, SMS notifications are sent automatically for invoice events:

Setting KeyPurpose
notification.sms_enabledMaster toggle for automated SMS (true/false)
notification.sms_invoice-createdSMS template for new invoices
notification.sms_invoice-paidSMS template for payment confirmations
notification.sms_invoice-overdueSMS template for overdue notices
notification.sms_invoice-reminderSMS template for payment reminders
SMS templates use the same @{{variable}} syntax as email templates. SMS is sent only to users who have a phone number on their profile.

6. SMS Logging

All SMS sends are logged in two places: