承接 andreas-glaser/notify-bundle 相关项目开发

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

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

andreas-glaser/notify-bundle

Composer 安装命令:

composer require andreas-glaser/notify-bundle

包简介

A symfony bundle, making it easy to send email, sms and other notifications

README 文档

README

A symfony bundle, making it easy to send email, sms and other notifications

Requirements

  • PHP 7.x
  • Symfony 2.8.x LTS

Installation

composer require andreas-glaser/notify-bundle dev-master

Usage

Define Emails

# app/config/config.yml
andreas_glaser_notify:
  enabled: true
  channels:
    email:
      from_name: "Default Name"
      from_email: "my-default-from-email@email.com"

      emails:

        example_email:
          subject: Welcome :name"
          template_content: "AppBundle:Email:exampleEmail.html.twig"

Run following console command for a full list of config options.

./app/console config:dump-reference andreas_glaser_notify

Send Email

<?php

$subjectData = [
    ':name' => 'Some name'    
];

$bodyData = [];

/** @var \AndreasGlaser\NotifyBundle\Channel\Email\Email $email */
$email = $this
    ->container
    ->get('andreas_glaser_notify.channel_email.loader')
    ->load('example_email', $bodyData, $subjectData);

$this->container
    ->get('andreas_glaser_notify.channel.email.dispatcher')
    ->dispatch($email);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-07-23