承接 sanatorium/mailer 相关项目开发

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

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

sanatorium/mailer

Composer 安装命令:

composer require sanatorium/mailer

包简介

Mailing extension for Cartalyst Platform

README 文档

README

Mailing extension for Cartalyst Platform

Installation

Composer

Add repository to your composer.json

"repositories": [
  {
    "type": "composer",
    "url": "http://repo.sanatorium.ninja"
  }
]

Download the package

composer require sanatorium/mailer

Download

Download repository and copy it's contents to /extensions/sanatorium/mailer

Documentation

Mailer is built to dispatch transactional emails when Event is triggered.

Getting started

Let's imagine you want to send emails to customer and admin when order is placed.

Preparing template

After installation, open Mailtransactions menu and choose + icon to Create new template

The template for notification to admin would looks something like this:

event: order.placed
subject: New order was placed
template: Hello admin!<br>New order was placed on your {{ config('platform.app.title') }} site<br>
receivers: {{ config('platform.mail.from.address') }}

Let's assume our $order object contains customer's email in $order->customer_email, therefore we create new template with notification for customer like this:

event: order.placed
subject: Your order on {{ config('platform.app.title') }}
template: Hello!<br>Thanks for your order!<br><br>Best regards,<br>{{ config('platform.app.title') }} site<br>
receivers: {{ $order->customer_email }}

And then we trigger the event and pass data anywhere in the application like this:

Event::fire('order.placed', ['order' => $order])

Changelog

3.0.4 - 2016-09-15 - Platform 5 support, caching 1.2.3 - 2016-06-14 - Added common seed 1.1.0 - 2016-05-08 - Added simple documentation 1.0.0 - 2016-03-25 - Basic functionality

Support

Troubleshooting

Q: No hint path defined for [sanatorium/mailer] A: This might be caused by barryvdh/laravel-debugbar. Set following collector to false to get rid of this error message:

'debugbar.collectors.mail' => false

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2016-10-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固