Skip to content

gebes/BirthdayReminder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BirthdayReminder

GoReportCard

Mail birthday reminder for our school class.

Functionality

BirthdayReminder checks every day at 6:00 am if someone has a birthday. If so, then BirthdayReminder generates a mail and sends it to everyone except the birthday person. If multiple people have a birthday on the same day, then BirthdayReminder will adapt the message to be grammatically correct.

Requirements

Setup a MySQL Database

Create a user table.

CREATE TABLE IF NOT EXISTS user(
    id SERIAL,
    name VARCHAR(64),
    mail VARCHAR(128),
    birthday VARCHAR(10),
    wants_others_notified BOOL,
    wants_notifications BOOL,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

Create some entries.

INSERT INTO user(name, mail, birthday, wants_others_notified, wants_notifications) 
VALUES ("Christoph", "mail@mail.com", "01.01.1970", true, true), 

### Get a Sendgrid API Key
Create a Sendgrid Account and get your API Key

### .env

```dotenv
MYSQL_DATABASE=user:password@tcp(host:port)/birthdayreminder
SENDGRID_API_KEY=SG.key123abc

Deploy

Use the Dockerfile to deploy the BirthdayReminder on your server.

About

Mail birthday reminder for our school class

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published