Download the PHP package mtymek/mt-mail without Composer
On this page you can find all versions of the php package mtymek/mt-mail. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mtymek/mt-mail
More information about mtymek/mt-mail
Files in mtymek/mt-mail
Package mt-mail
Short Description Zend Framework e-mail module. Using this library can easily create e-mail messages from PHTML templates (with optional layouts) and send them using configurable transports. Pluggable, EventManager-driven architecture allows you to customize every aspect of the process.
License BSD 2-Clause
Informations about the package mt-mail
E-mail module for Zend Framework
Introduction
MtMail handles common activities surrounding sending e-mail from applications, mainly creating messages from templates, and sending them through transport adapters.
Features:
- factory for creating e-mail messages
- factory for e-mail transport adapters, service for one-line dispatch
- rendering templates from
phtml
files, usingZend\View
andPhpRenderer
- rendering templates with layouts
- plugins for various common tasks: from setting default headers to generating plaintext version of HTML message
- plugin support via dedicated plugin managers
Installation
Installation is supported via Composer:
Creating e-mails
Configuration
By default MtMail doesn't require any extra configuration. It will use Zend\View
to render
templates accessible by your application.
Usage
Creating message from controller:
This snippet will create a message, compose it with $headers
and HTML body
rendered from welcome.phtml
template (injected with $variables
array).
Layouts
In order to give your e-mails common layout, you have to enable "Layout" plugin and tell it where to look for layout template:
For more info about composing e-mail messages, check [the documentation](doc/Composing messages.md). You can also check [documentation for plugins](doc/Composer Plugins.md).
Sending e-mails
Configuration
Update your application config:
Usage
Add following code to your controller:
For more info on sending e-mails, check [the documentation](doc/Sending messages.md).
All versions of mt-mail with dependencies
zendframework/zend-view Version ^2.2.1
zendframework/zend-escaper Version ^2.2.1
zendframework/zend-mail Version ^2.2.1
zendframework/zend-filter Version ^2.2.1
zendframework/zend-validator Version ^2.2.1
zendframework/zend-modulemanager Version ^2.2.1
zendframework/zend-servicemanager Version ^2.7.5 || ^3.0.3
zendframework/zend-eventmanager Version ^2.6.0 || ^3.0.1