2017 © Pedro Peláez
 

symfony-bundle notify-bundle

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

image

andreas-glaser/notify-bundle

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

  • Thursday, May 25, 2017
  • by andreas-glaser
  • Repository
  • 1 Watchers
  • 2 Stars
  • 519 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

NotifyBundle

A symfony bundle, making it easy to send email, sms and other notifications, (*1)

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., (*2)

./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);

The Versions

25/05 2017

dev-master

9999999-dev https://github.com/andreas-glaser/notify-bundle

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

  Sources   Download

MIT

The Requires

 

The Development Requires