Download the PHP package zbateson/php-dummy-sendmail without Composer
On this page you can find all versions of the php package zbateson/php-dummy-sendmail. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zbateson/php-dummy-sendmail
More information about zbateson/php-dummy-sendmail
Files in zbateson/php-dummy-sendmail
Package php-dummy-sendmail
Short Description sendmail dummy for testing written in PHP
License BSD-3-Clause
Homepage https://github.com/zbateson/php-dummy-sendmail
Informations about the package php-dummy-sendmail
zbateson/php-dummy-sendmail
sendmail dummy for testing written in PHP
PHP based 'sendmail' dummy for writing emails to a directory for testing.
- Predictable and configurable file-naming
- Configurable output directory and file extension
Installation
Currently, installing involves either creating the phar archive from the repo, or running it directly from the repo.
Dependencies must be downloaded and installed with composer - to do so:
This depends on how composer is installed, if that fails please ensure composer is installed and review composer's documentation at: https://getcomposer.org/doc/00-intro.md
To create the phar archive, after cloning, use clue/phar-composer and run phar-composer build to create php-dummy-sendmail.phar. Once created, optionally move it to /usr/local/bin or configure sendmail with php path/to/php-dummy-sendmail.phar.
clue/phar-composer will automatically set execute permissions. you may need to run this with sudo
To run directly without creating a phar archive, the main project file sendmail, is an executable file in bash and can be run with:
In Windows php-dummy-sendmail can be run with:
Configure php.ini
Change the sendmail configuration in php.ini:
Usage
php-sendmail [--directory[="..."]] [--timestamp[="..."]] [--increment-file[="..."]] [--input-file[="..."]] [--file-extension[="..."]] [--print] [to]
Example: php-sendmail [email protected] --directory /path/to/output/dir --timestamp "Y-m-d H:i:s:u" --file-extension txt
php-sendmail reads from STDIN by default, so the above example run on the command line would block.
Command-line Options
--directory - specifies the default directory to read/write to (useful if not the current dir)
--timestamp - PHP date() timestamp format (with 'u' support), used to format the output file name. Defaults to 'Y-m-d H:i:s:u'
--increment-file - Specifies a file to save an index number for auto-increment functionality. File names are numbered with this option set.
--file-extension - Sets the file extension to use for saved files.
--input-file - Specify an input file (useful for debugging)
--print - Simply prints the output