send a weekly mail automatically
Find a file
2025-06-07 03:57:54 +02:00
app if we send an error mail, we also print the error to stderr 2025-06-07 03:57:54 +02:00
.gitignore first working commit 2022-11-08 20:16:34 +01:00
CHANGELOG.md first working commit 2022-11-08 20:16:34 +01:00
choirMail.cabal added error handling to the web request (and changed from req to wreq) 2025-06-07 03:33:27 +02:00
choirMail.nix added error handling to the web request (and changed from req to wreq) 2025-06-07 03:33:27 +02:00
default.nix let nixpkgs choose library and compiler versions, hopefully nothing will brake lol 2023-03-16 12:03:42 +01:00
flake.lock flake update 2025-06-06 18:42:03 +02:00
flake.nix some minor code cleanup 2025-06-06 19:10:46 +02:00
LICENSE Initial commit 2022-11-06 14:10:15 +01:00
README.md if we send an error mail, we also print the error to stderr 2025-06-07 03:57:54 +02:00

[TOC]

choirMail

send a weekly mail automatically

Building

Just run nix build.

Running

Just run the binary to send a mail, it requires exactly one parameter that points to a config file.

Configuration

The config file is a toml file, even though as of now it makes not really use of any toml features.

[mail]
domain   = "the domain of the smtp server to send messages with"
user     = "the username on the smtp server"
password = "the password on the smtp server"
to       = "the mail to send to"
from     = "the sender of the mail"
errorTo  = "the address to send a mail to in case of error"

Develop

If you run nix develop you get a set up kakoune with an lsp. Be aware this depends on your local cabal cache.

TODO

  • Better E-Mail generation
  • Add the nix modules to the flake
  • Better Error handling
    • Find out which exceptions the SMTP module throws
    • also log to stderr if we send an error E-Mail
    • move from MonadFail to MonadError from Control.Monad.Except
  • Split config into secrets and non secret config
    • make the pad url configurable
  • Clean up Strict vs Lazy Text
  • decide finally if we want to use wreq or req and don't flip flop between both libs