Download the PHP package glpzzz/form-mailer without Composer
On this page you can find all versions of the php package glpzzz/form-mailer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download glpzzz/form-mailer
More information about glpzzz/form-mailer
Files in glpzzz/form-mailer
Package form-mailer
Short Description Render a yiisoft form model to an email and send it with Symfony Mailer.
License MIT
Informations about the package form-mailer
glpzzz/form-mailer
Render a yiisoft/form-model form to an
email and send it with Symfony Mailer. Replaces the hand-copied MailMessage
interface + EmailOutput trait + inline send wiring that TechniqueWeb sites
duplicated.
Install
Use
Make the form mailable — implement MailableForm, add RendersFieldTable:
Wire the mailer once and send after validation:
Templates
@form-mailer/table.html.twig is the default: sans-serif, an <h1> subject,
and the field table with 0.25em cell padding and right-aligned labels. Nothing
else - no wrapper, colours, or web fonts.
For a different look, ship your own template and register the directory:
Forms that aren't a label/value table
Skip RendersFieldTable, implement mailContext(): array by hand, and point
mailTemplate() at your own template. BodyRenderer renders any Twig template;
you still get FormMailer::send(), MailSettings and captcha.
What it renders
- HTML body from your Twig template.
- A plain-text part from the matching
*.txt.twig(the bundledtable.txt.twiggives a cleanLabel: valuelist); without one, a text part is derived from the HTML - crudely, or well ifleague/html-to-markdownis installed.
All versions of form-mailer with dependencies
symfony/event-dispatcher Version ^7.4
symfony/mailer Version ^7.4
symfony/mime Version ^7.4
symfony/twig-bridge Version ^7.4
twig/twig Version ^3.10
yiisoft/form-model Version ^1.1
yiisoft/validator Version ^2.6
packaged/figlet Version ^0.0.2