
If you have a Laravel application, this package sends SMS notifications through the SMS Center, sends your app's mail through E-mail Center, and works with domains, DNS and WHOIS, all on our API.
What it does
SMS: an 'sms' channel for notifications. Return 'sms' from via() and write a toSms() method.
Mail: a interweb_ao mailer for E-mail Center. Mailables, mail notifications, attachments, Cc and Bcc all work.
The rest of the API: the InterwebAo facade handles domains, WHOIS, DNS, SMS and E-mail Center, and calls any other operation, for example InterwebAo::get('/v1/services');.
What you need
Laravel 8 to 12, and PHP 7.4 or newer with cURL. No other packages. And an API key, created in the API Center of Meu Interweb.
Installing, step by step
|
|
|
|
To send your app's mail through E-mail Center, add the interweb_ao mailer to config/mail.php and set MAIL_MAILER=interweb_ao in .env. An SMS to any number goes out like this:
Notification::route('sms', '+244923123456')->notify(new OrderShipped());
The API key and its permissions
SMS notifications need sms:write, and SMS must be active in the SMS Center of the account. Mail needs email_center:write, and the sender (MAIL_FROM_ADDRESS) must be on a sender domain verified in E-mail Center.
When you are ready, create a prod_ key with only the permissions you use. See permissions by area.
Testing without spending
Start with a sandbox_ key: writes are simulated and nothing is charged. InterwebAo::wasSimulated() tells you whether the last write was only simulated. WHOIS works without a key too.
Good to know
Queues: queued notifications are safe to retry: the same notification never sends the SMS twice.
Retries: POST requests carry an Idempotency-Key, so a retry never registers or sends twice. Requests that get 429, 500, 502 or 503 are retried after a short wait.
Templates: to send with an E-mail Center template, add 'template_id' => 7 to the mailer and use 'variables' for its values.
Errors: every error is a InterwebAo\Laravel\ApiException. Its hint() tells you what to do, in one sentence.
Help
If the API returns an error you do not understand, open a support ticket and send us what getCorrelationId() returns on the exception, never the key. The code is in the Laravel package repository, under the MIT license.
|
Ready to send SMS and mail from Laravel? Download the latest release |
|
SEE ALSO Getting a Laravel application running |
RECOMMENDED PRODUCT Register your .ao domain Secure your company name before someone else registers it. from $36.63/yr Search a domain |











