Download the PHP package spekulatius/linux-bash-mail-merge without Composer
On this page you can find all versions of the php package spekulatius/linux-bash-mail-merge. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download spekulatius/linux-bash-mail-merge
More information about spekulatius/linux-bash-mail-merge
Files in spekulatius/linux-bash-mail-merge
Package linux-bash-mail-merge
Short Description Mail merge tool for bash
License MPL-2.0
Homepage https://peterthaleikis.com/posts/mail-merge-for-linux/
Informations about the package linux-bash-mail-merge
Mail Merge helper for Linux
This package was created by and is maintained by Peter Thaleikis. It provides a simple helper to replicate popular mail merge services. You can use a CSV file to populate content using a template and trigger mailto actions on your preferred browser. If you'd like to contribute, please see mail merge project on my blog.
Installation
Requirements
The project itself doesn't have any direct dependencies. Your system will need to fulfill some basic requirements though:
-
Linux with bash. I've not tried any other approaches, but there is a chance it works on systems of similar nature (e.g. MacOS).
-
x-www-browser to be set to your browser. You can adjust this using the command
sudo update-alternatives --config x-www-browser -
A browser supporting
mailto:-URLs being executed and directed to your email provider. Firefox 73 does this by default. - PHP 7.2 or newer. This will be raised as PHP versions go out of support.
Usage
- Fill in your CSV file and name it
targets.csv. You should always have at least the following headers:SubjectandEmailas the script uses these. - Write your template file and name it
template.txt. Within the template file you can use any headers defined in the CSV file. The subject line should always be the first line and can start withSubject:(optional). Please note that you should write all headers in capital letters. So,Emailwould be transformed toEMAILautomatically. - Run
php generate.phpto trigger the merge of the content and the relatedmailto:commands. You might need to allow these actions to be triggering your provider email (e.g. Gmail). You can test this by clicking this link: mailto:[email protected].
Troubleshooting
If you have placeholders in your template which aren't replaced with content from the CSV file, it might break the email being generated properly. Always ensure all placeholders exist in the CSV file.
Support
You can support my open source work and the development through Buy me a coffee. Social shares are also appreciated. If you'd like to get informed about major changes and other new projects you can subscribe to my newsletter.
License
The mail merge package is open-source software and licensed under the MPL-2.0 license.