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
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
其他信息
- 授权协议: MIT
- 更新时间: 2022-08-31
