astrotomic/notifynder-sender-email

此包已被弃用且不再维护。未建议替代包。

Notifynder 包的电子邮件发送器。

1.1.0 2017-02-09 13:18 UTC

This package is not auto-updated.

Last update: 2019-10-22 12:02:42 UTC


README

GitHub release GitHub license GitHub issues Total Downloads

StyleCI

Code Climate

Slack Team Slack join

文档: Notifynder 文档

安装

步骤 1

composer require astrotomic/notifynder-sender-email

步骤 2

将以下字符串添加到 config/app.php

提供者数组

Astrotomic\Notifynder\NotifynderSenderEmailServiceProvider::class,

步骤 3

将以下数组添加到 config/notifynder.php

'senders' => [
    'email' => [
        'view' => 'your.email.view.name',
        'store' => false, // wether you want to also store the notifications in database
    ],
],

在您的 app/Providers/AppServiceProvider.php 中注册发送器回调

<?php
namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Astrotomic\Notifynder\Senders\EmailSender;
use Illuminate\Mail\Message as MailMessage;
use Fenos\Notifynder\Builder\Notification;

class AppServiceProvider extends ServiceProvider
{
    public function boot()
    {
        app('notifynder.sender')->setCallback(EmailSender::class, function (MailMessage $message, Notification $notification) {
            // handle the message and append the from, to, subject and so on
            return $message;
        });
    }
}