Mail Merge
What is Mail Merge?
Mail Merge is a PHP library for document generation with mail-merge support (using data-providers such as a database
entities, CSV files, spreadsheets, etc). It utilizes template providers, transformers, placeholder collections, and
parser/generator engines., (*1)
Requirements
Only PHP versions 5.4 and above are supported., (*2)
Installation
The recommended installation method is through Composer, a dependency management library for PHP., (*3)
Composer
If you have cURL and PHP installed, getting Composer is as easy as:, (*4)
curl -s https://getcomposer.org/installer | php
Add the zanderbaldwin/mailmerge as a dependency of your project
by running:, (*5)
php composer.phar require zanderbaldwin/mailmerge
Or adding it manually to your composer.json file:, (*6)
{
"require": {
"zanderbaldwin/mailmerge": "dev-develop"
}
}
Cloning
Alternatively, clone the repository directly with git clone git://github.com/zanderbaldwin/mailmerge.git, and
include the basic autoloader in your application., (*7)
<?php
require_once __DIR__ . '/mailmerge/MailMerge.php';
Quick Start
For the current dev-develop version of this library, an example script can be found at docs/example.php.
The example script is not valid PHP but provides commentary on how the library is envisioned., (*8)
Running Tests
Run PHPUnit from the project's root directory., (*9)
php ./vendor/bin/phpunit
Contributing
To contribute to this project, all bug reports, feature requests or patches (pull requests) must be done through the
GitHub repository page. Please see the CONTRIBUTING
file for more details., (*10)
License
MailMerge is licensed under the MIT/X11 license, see the accompanying LICENSE
file for the full license., (*11)