使用nexmo在laravel中将发件人名称从Verify更改为我的公司名称
我尝试将nexom“verify”提供的消息标题更改为我的公司名称。我升级了我的nexmo账户并把钱放进去。我试着使用,但不是工作 这是我的通知使用nexmo在laravel中将发件人名称从Verify更改为我的公司名称,laravel,notifications,nexmo,Laravel,Notifications,Nexmo,我尝试将nexom“verify”提供的消息标题更改为我的公司名称。我升级了我的nexmo账户并把钱放进去。我试着使用,但不是工作 这是我的通知 <?php namespace App\Notifications; use Illuminate\Bus\Queueable; use Illuminate\Notifications\Notification; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notif
<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Messages\NexmoMessage;
//use App\admin\Course;
class ConfirmedCourse extends Notification
{
use Queueable;
protected $course;
/**
* Create a new notification instance.
*
* @return void
*/
public function __construct($course)
{
$this->course = $course;
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
* @return array
*/
public function via($notifiable)
{
return ['nexmo'];
}
public function toNexmo($notifiable)
{
try {
$message = new NexmoMessage();
$message->from('basma center')->content($this->course)
->unicode();
return $message;
}catch (\Exception $e) {
$e->getMessage();
}
}
}
查看来自Laravel的代码,我相信您所做的是正确的,因为看起来他们通过了您的“from”设置来备份通知堆栈。我唯一能想到的可能是国家限制,因为不同的国家对发件人数据有不同的SMS要求 您可能需要检查列表,以查看承运人是否正在覆盖该列表
还要记住,Laravel通知是纯短信,它们不是我们的产品。对于原始短信,您可以设置为“发件人”选项的限制要大得多(请参见上面的国家/地区限制) 是的,没错,我试过其他国家,从美国