Mailtrain

Self hosted newsletter app

Digital Marketing & SEOJavaScriptGPL-3.0

Abstract

Mailtrain is an open-source Digital Marketing & SEO project. Self hosted newsletter app. Mailtrain is a self hosted newsletter application built on Node.js (v14+) and MySQL (v8+) or MariaDB (v10+). It is built using JavaScript. Key capabilities include: Subscriber lists management; List segmentation; Custom fields. The complete source code is publicly available on GitHub under the GNU General Public License v3.0, making it a useful reference for students building a Digital Marketing & SEO mini project or final-year project.

1. Introduction

Mailtrain is a self hosted newsletter application built on Node.js (v14+) and MySQL (v8+) or MariaDB (v10+).

This is version 2 of Mailtrain. It mostly implements all features of v1 and add some more. It is a complete rewrite, so you will have to install it from scratch.

2. Objective

Self hosted newsletter app

This project demonstrates how JavaScript can be applied to a real-world Digital Marketing & SEO problem.

3. Key Features / Modules

  • Subscriber lists management
  • List segmentation
  • Custom fields
  • Email templates (including MJML-based templates)
  • Custom reports
  • Automation (triggered and RSS campaigns)
  • Multiple users with granular user permissions and flexible sharing
  • Hierarchical namespaces for enterprise-level situations
  • Builtin Zone-MTA (https://github.com/zone-eu/zone-mta) for close-to-zero setup of mail delivery

4. Technology Stack

JavaScript
  • 4096 MB RAM

5. System Requirements

General requirements for this technology stack — check the README for exact versions.

  • Node.js (LTS) and npm
  • A modern web browser
  • VS Code or any code editor
  • Git (to clone the repository)

6. Installation & Setup

git clone https://github.com/Mailtrain-org/mailtrain.git
cd mailtrain
  1. Login as root. (I had some problems running npm as root on CentOS 7 on AWS. This seems to be fixed by the seemingly extraneous su within sudo.)
  2. Install GIT
  3. Download Mailtrain using git to the /opt/mailtrain directory
  4. Run the installation script. Replace the urls and your email address with the correct values. NOTE that running this script you agree
  5. Start Mailtrain and enable to be started by default when your server starts.
  6. Open the trusted endpoint (like https://mailtrain.example.com)
  7. Authenticate as admin:test
  8. Update your password under admin/Account
sudo su -
yum install -y git
apt-get install -y git
cd /opt
    git clone https://github.com/Mailtrain-org/mailtrain.git
    cd mailtrain
    git checkout v2

Full setup instructions are in the project README.

7. Future Enhancements

Suggested extensions you can add to make this your own project.

  • Export reports to Google Sheets or PDF
  • Schedule weekly automated reports
  • Add competitor comparison

8. Viva / Review Questions

Common questions examiners ask for projects in this domain.

  1. Which marketing or SEO problem does this tool solve?
  2. Which data sources or APIs does it use (Search Console, Analytics, social platforms)?
  3. Which metrics or KPIs does it report and how are they calculated?
  4. How could the output help a business make decisions?
  5. How would you schedule it to run automatically?

9. Source Code & License

This project is developed by Mailtrain-org and published on GitHub under the GNU General Public License v3.0. Please follow the license terms and credit the original author when you use or modify this code.

Want to build this as your internship project?

Work on a Digital Marketing & SEO project like this with mentor guidance, weekly reviews and an internship certificate from Training Trains, Erode — online or offline.

Apply for Digital Marketing & SEO Internship