Download the PHP package cnerta/mailing-bundle without Composer
On this page you can find all versions of the php package cnerta/mailing-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cnerta/mailing-bundle
More information about cnerta/mailing-bundle
Files in cnerta/mailing-bundle
Package mailing-bundle
Short Description CnertaMailinBundle is a Symfony2 Bundle who provide an easy way to send email build with Twig template
License MIT
Homepage https://github.com/waldo2188/
Informations about the package mailing-bundle
/!\ Repository not maintained and outdated /!\
CnertaMailingBundle
CnertaMailinBundle is a Symfony2 Bundle who provide an easy way to send email build with Twig template.
Create your email message with Twig and use the CnertaMailinBundle's service for sending it.
Easy, fast and builded on the shoulders of giants like SwiftMail.
Installation
Composer
Add to composer json:
Run:
Register the bundle in your AppKernel
class.
Configure the bundle
In config.yml
How To Use
Create mail templates
- Create a
Mails
folder in yoursrc/AppBundle/Resources
- Create a
BlocksMail.html.twig
in this new folder - Create a
default.html.twig
- Create a
default.txt.twig
The BlocksMail.html.twig
must contain all the objects and bodys part of your mail.
Exemple :
The default.html.twig
is the base template of your mail
Exemple :
The default.txt.twig
is the base template of your mail
Exemple :
Send mail !
Service name : cnerta.mailing
In a Controller
:
Log all sending email in a specific channel
Because sometime you need to know what thé system send as email, this bundle provide an easy way to log all message.
This bundle use the mailingbundle
channel to write log.
So, if you want to log this specific messages in a separate log file, use the config below.
All versions of mailing-bundle with dependencies
symfony/symfony Version >=2.5
twig/extensions Version ~1.0
symfony/swiftmailer-bundle Version ~2.3