numesia/mailjet 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

numesia/mailjet

最新稳定版本:1.4

Composer 安装命令:

composer require numesia/mailjet

包简介

Mailjet Notifications driver

README 文档

README

This package makes it easy to send notifications using Mailjet with Laravel 5.5+, 6.x and 7.x.

Contents

Prerequisite

Configure https://github.com/mailjet/laravel-mailjet

Installation

You can install the package via composer:

composer require numesia/mailjet

Add the Mailjet Provider :

'providers' => [
    ...
    Numesia\Mailjet\MailjetServiceProvider::class,
    ...
]

Usage

Now you can use the channel in your via() method inside the notification:

use Numesia\Mailjet\MailjetChannel;
use Numesia\Mailjet\MailjetMessage;
use Illuminate\Notifications\Notification;

class ProjectCreated extends Notification
{
    public function via($notifiable)
    {
        return [MailjetChannel::class]; // or 'mailjet'
    }

    public function toMailjet($notifiable)
    {
        return (new MailjetMessage)
            ->sender("sender@email.com")
            ->name("Sender Name")
            ->subject("My Subject")
            ->content("My Html Content"); // or ->view("view:location", [])
    }
}

In order to let your Notification know which email to use, add the routeNotificationForMailjet method to your Notifiable model.

This method needs to return an email.

public function routeNotificationForMailjet(Notification $notification)
{
    return $this->email;
}

Testing

$ composer test

统计信息

  • 总下载量: 760
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-10-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固