承接 ayoub-amzil/failed-job-notifier 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

ayoub-amzil/failed-job-notifier

最新稳定版本:1.0.0

Composer 安装命令:

composer require ayoub-amzil/failed-job-notifier

包简介

A Laravel package to send email notifications on failed queued jobs.

README 文档

README

A Laravel package to send email notifications whenever a queued job fails.

Installation

composer require ayoub-amzil/failed-job-notifier

Setup

1. Publish the configuration file

php artisan vendor:publish --tag=failed-job-notifier-config

2. Configure the notification emails

Edit config/failed-job-notifier.php and add your notification recipient emails:

return [
    'notify_emails' => [
        'admin@example.com',
    ],
];

Mail Configuration

To receive email notifications on failed jobs, configure your Laravel mail settings in .env:

MAIL_MAILER= smtp / log
MAIL_HOST=you_host
MAIL_PORT=2525
MAIL_USERNAME=your_username
MAIL_PASSWORD=your_password
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=your-email@example.com
MAIL_FROM_NAME="Your App Name"

Set mail sending to synchronous for immediate delivery:

MAIL_MAILER=smtp

But if you prefer to log emails instead of sending, set:

MAIL_MAILER=log

Emails will be saved in storage/logs/laravel.log for review. But make sure your queue worker is running if you use queued mail notifications:

php artisan queue:work

This ensures you get timely email notifications when jobs fail.

How It Works

  • Listens to Laravel's JobFailed event.
  • Sends an email notification with details about the failed job.
  • Uses Laravel’s built-in failed job handling for storage (no duplication).

Compatibility

  • Laravel 10, 11, 12+
  • PHP 8.1+

License

MIT License

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-27