📮 Briefkasten is a standalone app used for case reporting. It renders a form from configuration and forwards submitted content to the desired email address.
Briefkasten is a small Ruby app using the Sinatra web framework.
Using Ruby 3.0.1 (install it eg via rbenv)
There are some libs you need on your system, for Debian-based systems that would be
$ sudo apt install libsqlite3-dev sendmail
Then install Ruby dependencies.
$ bundle install
Copy the the env.sample
file over and adjust the values
$ cp env.sample .env
source it $ source .env
Time to start up the app!
$ bundle exec thin start
You should see the app at localhost:3000
.
The default method of sending mail is sendmail
.
But you can use mailcatcher
to send emails and debug them in a browser-based email client, too, the gem is already added.
Start mailcatcher
in a different terminal window with $ bundle exec mailcatcher
and comment out this line in app.rb
mail.delivery_method :sendmail
in favor of this line
mail.delivery_method :smtp, address: "localhost", port: 1025
and restart thin.