This free as in freedom command line tool to easy up sending mails from the command line. Thanks to Swiftmailer. This is just a command line frontend using the great swiftmailer.
The current change log can be found here.
send_mail "<email address of the sender>" "<email address of the recipient>" "<subject>" "<path/to/the/file.txt|html>" [--bcc=<email address of an blind carbon copy - can be used multiple times>] [--cc=<email address of a carbon copy - can be used multiple times>][-v|--verbose] [--attachment=<path to a file you want to attach> - can be used multiple times]
send_mail - send an email via the command line
send_mail [FROM] [TO] [SUBJECT] [PATH TO THE CONTENT FILE] [OPTIONS]
Send an email via the command line. The content is stored inside a file to easy up usage. Text or html is detected automatically.
Written by Stev Leibelt.
Report bugs to https://github.com/stevleibelt/php_send_email_via_command_line/issues
Copyright © 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
mkdir -p /opt/stevleibelt
cd /opt/stevleibelt
git clone https://github.com/stevleibelt/php_send_email_via_command_line
composer install
composer require stevleibelt/php_send_email_via_command_line
Currently, there is no merging of local.dist.php
and local.php
.
If you create a local.php
, you have to copy the whole configuration section.
#only do it if you really need it.
cp configuration/local.dist.php configuration/local.php
#adapt it to your needs
vim configuration/local.php