Download the PHP package illarra/email-bundle without Composer
On this page you can find all versions of the php package illarra/email-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package email-bundle
Illarra Email Bundle
This bundle let's you create HTML emails with inline styles using Twig as the template language. It's made of two services:
- Renderer: Updates the given Swift_Message using a Twig layout/template and css.
- Mailer: It's a wrapper for the default "@mailer" service which let's you use profiles to tell who is sending the email.
Configuration
config.yml
:
Renderer
Layout & template
Both layout & template need a Twig path. Layout and templates are separated, so that is easier to maintain lot's of templates.
This is the minimum a $template
needs:
Note that layout in the extends
tag is a variable which corresponds to the
$layout
given in the updateMessage() method. The subject
block is used to
generate the email subject. Both are required.
The names of the layout variable and the subject block can be changed in
config.yml
:
CSS
You can use the @AcmeBundle/path/my.css
notation to locate your css. This css file
will be used to add inline styles to the generated HTML.
Mailer
Profiles are defined in config.yml
:
Define the From and ReplyTo options like in a Swift Message:
{'email': 'name'}
. You can define multiple emails in the From parameter, all
of them will be visible to the addressee, but only the first one will be the
actual Sender.
All versions of email-bundle with dependencies
inlinestyle/inlinestyle Version ~1.0
swiftmailer/swiftmailer Version >=4.2.0,<5.1-dev
twig/twig Version >=1.11.0,<2.0