【问题标题】:Change Sender Name from Verify to My company name in laravel using nexmo使用 nexmo 在 laravel 中将发件人名称从验证更改为我的公司名称
【发布时间】:2023-03-20 05:44:01
【问题描述】:

我尝试将 nexom "verify" 提供的消息标题更改为我的公司名称。我升级了我的 nexmo 账户并把钱存入其中。我尝试使用但不工作。

这是我的通知

<?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 notifications vonage


    【解决方案1】:

    查看 Laravel 的代码,我相信您所做的是正确的,因为看起来他们将您的“来自”设置传递回了通知堆栈。我唯一能想到的可能是国家/地区限制,因为不同国家/地区对发件人数据有不同的 SMS 要求。

    您可能需要检查Country Specific Features and Recommendations 列表以查看运营商是否覆盖了此内容。

    另外请记住,Laravel 通知是纯 SMS 消息,它们不是我们的 Verify 产品。您可以使用原始 SMS 设置为“发件人”选项的内容受到更多限制(请参阅上面的国家/地区限制)。

    【讨论】:

    • 是的,没错,我试过其他国家,从出现坦克你
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-05-12
    • 2012-05-02
    • 2021-08-08
    • 1970-01-01
    • 2020-11-01
    • 2011-04-30
    • 1970-01-01
    相关资源
    最近更新 更多