Skip to content

Clojure-powered automated email sender for birthdays and anniversaries.

License

Notifications You must be signed in to change notification settings

blairnangle/birthdays

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

birthdays

Clojure-powered automated email sender for birthdays and anniversaries.

Works with Gmail or Zoho, currently.

Cloning/forking

On GitHub, a fork of a public repository must also be public:

A fork is a new repository that shares code and visibility settings with the original “upstream” repository.

(One nice thing about a GitHub fork is that syncing with the original project can be done easily on the GitHub UI.)

However, it's probably not a good idea to expose your friends' personal details, so one fairly simple way of making use of this project in a private repo (while maintaining the ability to periodically integrate upstream changes) is to create a private fork—see this Stack Overflow answer for a step-by-step guide (unfortunately, this means that syncing your repo with upstream changes via GitHub's UI isn't possible).

Example

Duplicate the code

git clone --bare https://github.com/blairnangle/birthdays.git
cd birthdays.git
git push --mirror https://github.com/yourname/birthdays-private.git
cd ..
rm -rf birthdays.git

Get the cloned project on your local machine

git clone https://github.com/yourname/birthdays-private.git
cd birthdays-private
[make some changes]
git commit
git push origin main

Sync with upstream (public) changes by creating a new remote

git remote add public https://github.com/blairnangle/birthdays.git
git pull public main
git push origin main

Configuration

This project uses Omniconf to get application-level preferences and secrets into code. See src/birthdays/config.clj for a list of config options. Less obvious values are explicitly mentioned below.

Secret values should find there way into the code as GitHub Actions secrets -> environment variables -> read into config by Omniconf.

:email-provider

If you use Gmail, this value should be gmail. If you use Zoho Mail, this value should be zoho.

Save this as a GitHub Actions secret named EMAIL_PROVIDER.

:sender-email

Save this as a GitHub Actions secret named SENDER_EMAIL.

:password

Save this as a GitHub Actions secret named PASSWORD.

Gmail

You need a Google App Password to send emails on behalf of your Gmail account. This can be done here.

Zoho

If you have multifactor authentication (MFA) enabled for your Zoho Mail account, you will need to create an Application-Specific Password - see their docs. Even if you don't have MFA enabled, it is still a good idea to create one of these. Otherwise, a bad actor that gets their hands on your password will have access to everything in your account.

:cc

Emails to cc (can be omitted entirely). Save this as a GitHub Actions secret named CC.

For one cc recipient, e.g.:

For multiple cc recipients, e.g.:

:footer

Goes at the bottom of every email. Configure in the config namespace.

:input-file

Path to file holding birthdays and anniversaries data. Configure in the config namespace.

Execution

Locally

clojure -M -m birthdays.birthdays

Remotely

This program runs at 07:00 UTC daily in a GitHub Actions workflow from the commandline, scheduled by cron.

License

Distributed under an MIT License.

About

Clojure-powered automated email sender for birthdays and anniversaries.

Topics

Resources

License

Stars

Watchers

Forks