Skip to content
A command-line mail merge tool for dispatching mass emails.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Dispatch is a command-line mail merge tool for sending custom bulk emails to a list of recipients.


Dispatch requires two files to start a mail merge:

  • A data file, typically called data.csv, which contains the information to substitute into the placehodlers. The first row of the CSV file should define column headings that match up with the keyword placeholders present in the configuration JSON file. Every subsequent row defines one email to send, and may parameterize the keywords in any way.
  • A configuration file, typically called config.json, which contains the sender's email address, password, recipients (to, cc, bcc), a subject line, and a body. Fields may be parameterized with a keyword placeholder between { and }, which will be substituted for by the dispatcher.
    • The configuration file may also specify a custom server and port (Gmail is the default).
    • The "from" address, the password, the server, and the port cannot be parameterized.
    • If no password is specified, the user is prompted to type it in.
  • Optionally, you may add a body file, typically called body.html, which contains the HTML of the email body. If provided as a third command-line argument, it will be used instead of the configuration body as the body of the email. All newlines in the file will be first converted to HTML line breaks.

A sample config.json file is below:

    "from": "",
    "password": "PASSWORD",
    "to": ["{email}"],
    "subject": "Hello to {name}!",
    "body": "Dear {name},<br/><br/>Hello, world!"

And a corresponding sample data.csv file is below:

email,name,Person 1,Person 2


  • For Google email addresses with 2-factor authentication, you'll need to create and use an App Password to use Dispatch.
You can’t perform that action at this time.