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.
Only PHP versions 5.4 and above are supported.
The recommended installation method is through Composer, a dependency management library for PHP.
If you have cURL and PHP installed, getting Composer is as easy as:
curl -s https://getcomposer.org/installer | php
Add the zanderbaldwin/mailmerge
as a dependency of your project
by running:
php composer.phar require zanderbaldwin/mailmerge
Or adding it manually to your composer.json
file:
{
"require": {
"zanderbaldwin/mailmerge": "dev-develop"
}
}
Alternatively, clone the repository directly with git clone git://github.com/zanderbaldwin/mailmerge.git
, and
include the basic autoloader in your application.
<?php
require_once __DIR__ . '/mailmerge/MailMerge.php';
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.
Run PHPUnit from the project's root directory.
php ./vendor/bin/phpunit
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.
MailMerge is licensed under the MIT/X11 license, see the accompanying LICENSE file for the full license.