bdaymail

command module
v0.0.0-...-c557860 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2024 License: MIT Imports: 11 Imported by: 0

README

Happy Birthday Mailer

Small CLI utility to send birthday emails to a list of recipients. Written in Go.

It uses the Imgflip api to generate funny memes by randomly selecting a template from a list of IDs.

It is built to run via a daily cron job to send out birthday emails automatically to all recipients in a given JSON file.

First Run

On first run, the program will create a config.toml file in the same directory as the executable.

title = "Happy Birthday %s 🎉🎂🎈🎁🎊🥳" # Email subject

[smtp]
host = "smtp.example.com"    # SMTP server    
port = 587                   # SMTP port
user = "mail@example.com"    # SMTP username
pass = "CHANGE_ME"           # SMTP password

[imgflip]
text = "Happy Birthday!"     # Text to display on the meme
user = "example"             # Imgflip username
pass = "CHANGE_ME"           # Imgflip password
ids = [                      # Meme template IDs
    11797874,
    31643391
]

Input

This is an example of the input fellows.json file.

{
  "1": {
    "Forename": "John",
    "Surname": "Doe",
    "Birthdate": "01.06.2000",
    "Email": "john.doe@example.com"
  },
  "2": {
    "Forename": "Mary",
    "Surname": "Jane",
    "Birthdate": "31.05.2000",
    "Email": "mary.jane@example.com"
  }
}

Usage

bdaymail fellows.json

Build

make

Cross-compile

make cross

License

This project is licensed under the MIT License - see the LICENSE file for details.


Copyright © 2024 Typomedia Foundation. All rights reserved.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
app

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL