PHPackages                             spekulatius/linux-bash-mail-merge - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. spekulatius/linux-bash-mail-merge

ActiveLibrary[CLI &amp; Console](/categories/cli)

spekulatius/linux-bash-mail-merge
=================================

Mail merge tool for bash

0.1(6y ago)12MPL-2.0PHPPHP ^7.2

Since Feb 25Pushed 5y ago1 watchersCompare

[ Source](https://github.com/spekulatius/linux-bash-mail-merge)[ Packagist](https://packagist.org/packages/spekulatius/linux-bash-mail-merge)[ Docs](https://peterthaleikis.com/posts/mail-merge-for-linux/)[ RSS](/packages/spekulatius-linux-bash-mail-merge/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (2)Used By (0)

Mail Merge helper for Linux
===========================

[](#mail-merge-helper-for-linux)

This package was created by and is maintained by [Peter Thaleikis](https://peterthaleikis.com). 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 [CONTRIBUTING](CONTRIBUTING.md) for details. You can read more about the [mail merge project](https://peterthaleikis.com/posts/mail-merge-for-linux/) on my blog.

[![](video-screenshot.png)](https://www.youtube.com/watch?v=jLvmbJDe0ys)

Installation
------------

[](#installation)

```
git clone git@github.com:spekulatius/linux-bash-mail-merge.git
```

Requirements
------------

[](#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](https://getfirefox.com) 73 does this by default.
- PHP 7.2 or newer. This will be raised as PHP versions go out of support.

Usage
-----

[](#usage)

1. Fill in your CSV file and name it `targets.csv`. You should always have at least the following headers: `Subject` and `Email` as the script uses these.
2. 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 with `Subject:` (optional). Please note that you should write all headers in capital letters. So, `Email` would be transformed to `EMAIL` automatically.
3. Run `php generate.php` to trigger the merge of the content and the related `mailto:` 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: .

Troubleshooting
---------------

[](#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
-------

[](#support)

You can support my open source work and the development through [Buy me a coffee](https://www.buymeacoffee.com/spekulatius). 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](https://peterthaleikis.com/newsletter/).

License
-------

[](#license)

The mail merge package is open-source software and licensed under the [MPL-2.0](LICENSE.md) license.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2268d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8433587?v=4)[Peter Thaleikis](/maintainers/spekulatius)[@spekulatius](https://github.com/spekulatius)

---

Top Contributors

[![spekulatius](https://avatars.githubusercontent.com/u/8433587?v=4)](https://github.com/spekulatius "spekulatius (3 commits)")

---

Tags

climailmail-mergephpbashMail-merge

### Embed Badge

![Health badge](/badges/spekulatius-linux-bash-mail-merge/health.svg)

```
[![Health](https://phpackages.com/badges/spekulatius-linux-bash-mail-merge/health.svg)](https://phpackages.com/packages/spekulatius-linux-bash-mail-merge)
```

###  Alternatives

[titasgailius/terminal

Terminal is an Elegent wrapper around Symfony's Process component.

512340.9k11](/packages/titasgailius-terminal)[alecrabbit/php-console-spinner

Extremely flexible spinner for \[async\] php cli applications

24032.0k2](/packages/alecrabbit-php-console-spinner)[stepanenko3/nova-command-runner

Laravel Nova tool for running Artisan and bash(shell) commands.

36983.0k](/packages/stepanenko3-nova-command-runner)[bvanhoekelen/terminal-style

Return your terminal message in style! Change the text style, text color and text background color form the terminal interface with ANSI color codes. The terminal style tool support Laravel and Composer.

19784.4k2](/packages/bvanhoekelen-terminal-style)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
