Skip to content

ApiTreeCZ/newsletter

Repository files navigation

ApiTree s.r.o.
ApiTree

πŸŽ„ Newsletter πŸŽ„

Build QA

Christmas newsletter built with email-templates, made with ❀️

Merry Chrismtmas

πŸ‘€ Preview

The preview is available at https://apitreecz.github.io/newsletter/.

πŸ’Ύ Installation

nvm use
yarn install

βš™οΈ Configuration

Create .env from .env.example

  • DRY_RUN = 1 to run without actually sending, 0 to run normally
  • EMAIL_FROM = email sender in Name <user@domain.tld> format
  • EMAIL_TO = comma-separated list of newsletter recipient email addresses
  • SEND = 1 to send via SMTP server, 0 to render preview in browser
  • SMTP_PASSWORD = password to access the SMTP server
  • SMTP_SERVER = the SMTP server address
  • SMTP_USER = username to access the SMTP server

πŸ‘¨β€πŸ’» Usage

πŸ“¦ Build

yarn build

βœ‰οΈ Send

yarn send

To prevent the newsletter being sent multiple times to the same recipient a sent.json will be created. This will contain addresses and dates of sent emails that will be checked if send command is used again.

πŸ“„ Render

You can also render the newsletter into an HTML file. This will not send anything regardless the .env config.

yarn render