Skip to content
Advertisement

Laravel 8: Nexmo not sending code to mobile number country pakistan (Cannot send message without a sender address)

I am using laravel 8. I want to send a notification SMS through nexmo when user register, but it doesn’t work. It says Swift_TransportException Cannot send message without a sender address. I cannot find the solution for nexmo mobile. How to solve this problem in laravel 8.

UserController.php

JavaScript

User Model

JavaScript

MailNotification.php

JavaScript

service.yml

JavaScript

Advertisement

Answer

If you are using the notification channel, you will need to specify a sender address (docs). In your config/services.yml file you need to add:

JavaScript

where sms_from is a valid sender ID. What constitutes a valid sender ID depends on the country, you can find more information at:

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement