fenil/eatcard-mail-companion 问题修复 & 功能扩展

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

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

fenil/eatcard-mail-companion

最新稳定版本:1.0.0

Composer 安装命令:

composer require fenil/eatcard-mail-companion

包简介

This package is create mail service for eatcard subsystem.

README 文档

README

Eatcard Mail Companion


Packagist PHP Version Support Latest Version on Packagist

GitHub Workflow Status (branch) GitHub Tests Action Status GitHub Workflow Status

GitHub last commit GitHub Release Date

Total Downloads GitHub contributors GitHub

This companion package will help our team to manage to generic functionality and features at one place.

Installation

You can install the package via composer:

composer require weboccult/eatcard-mail-companion

Usage

use Weboccult\EatcardMailCompanion\Helpers\eatcardMailSend;

Available Services

  • Create Mail : To generate mail template based on requirements
  • Send Mail : To send mail via Laravel Queue/Jobs

Companion Config

here's how you can use publish companion config file to manage numerous settings

php artisan eatcardMailcompanion:publish --type=config

It will publish eatcardMailCompanion.php to your parent project

Basic Usage

Create Mail

  • Payload : user requirements
  • subject : Set mail subject
  • recipients : Recipients user email address
  • mailType : Type of mail (For developer)
  • fromName : Mail sender name
  • entityType : Type of mail (Where to get data)
  • entityId : Get data based on entityId
  • dispatch : Mail data dispatch in queue
  • template : Direct send mail template to user without details
  • bcc : Extra email addresses
  • cc : Extra email addresses
use Weboccult\EatcardMailCompanion\Helpers\eatcardMailSend;

eatcardMailSend()
    ->payload(['store_id' => $order['store_id'], 'recipient_type' => 'order.done'])
    ->subject(__('messages.takeaway_order_done_mail_sub') . ' ' . getDutchDate($order['order_date']))
    ->recipients($order['email'])
    ->bcc([])
    ->cc([])
    ->mailType('Order done mail from admin')
    ->fromName(env('MAIL_FROM_NAME'))
    ->template('Reservation create')
    ->entityType('order')
    ->entityId($order['id'])
    ->dispatch();

OR
use Weboccult\EatcardMailCompanion\EatcardMailCompanion;

EatcardMailCompanion::
    payload(['store_id' => $order['store_id'], 'recipient_type' => 'order.done'])
    ->subject(__('messages.takeaway_order_done_mail_sub') . ' ' . getDutchDate($order['order_date']))
    ->recipients($order['email'])
    ->bcc([])
    ->cc([])
    ->mailType('Order done mail from admin')
    ->fromName(env('MAIL_FROM_NAME'))
    ->template('Reservation create')
    ->entityType('order')
    ->entityId($order['id'])
    ->dispatch();
    

Send Mail

  • Mail send from jobs (SendMailJobs)
  • Create mail entry in mongoDb database after sending mail successfully to user
  • If something went wrong in mail sending part then data moved on failed jobs table

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-08-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固