Commit Graph

13 Commits

Author SHA1 Message Date
Guilherme Rugai Freire
bf21d05b6d
refactor web_server code
- Move mail functions to its own packages;
- Move bigger router functions to its own functions, and separate
  router creation from main function;
- Edit the algorithm that choses the format will be chosen with
  regards to format preference to a simples one.
2024-03-19 11:30:25 -03:00
Guilherme Rugai Freire
ddcf9dea62
add separate page for viewing the email 2024-03-18 15:47:15 -03:00
Guilherme Rugai Freire
3d33831803
url param to set mail format 2024-03-18 15:12:45 -03:00
Guilherme Rugai Freire
b2a85dd3f8
add MIME email rendering
This commits adds support for rendering email in text/html,
text/markdown and text/plain inside a MIME/multipart mail.

Bluemonday was added as a dependency and initialized but it is still not
used because the styling of the email is "discarted" too much. But this
needs to be fixed before going to production.
2024-03-16 18:12:06 -03:00
Guilherme Rugai Freire
f4407d71f8
render inbox as html instead of json 2024-02-20 18:02:30 -03:00
Guilherme Rugai Freire
95252f12f5
add index page and button to generate random inbox 2024-02-20 17:59:47 -03:00
Guilherme Rugai Freire
40900f3112
add templ and initial frontend code 2024-02-20 16:13:44 -03:00
Guilherme Rugai Freire
4ed9c46923
add route to list rcpt_addr's mails as json 2024-02-20 01:56:39 -03:00
Guilherme Rugai Freire
43a8d7addf
remove useless port checking from mail server 2024-02-20 01:08:39 -03:00
Guilherme Rugai Freire
5767f9d594
add simple web server 2024-02-20 01:08:13 -03:00
Guilherme Rugai Freire
6e0e577916
make mail server addr and port dinamically via env 2024-02-20 00:45:32 -03:00
Guilherme Rugai Freire
7e8327fd0d
remove inboxes table and add arrived_at column
there is no current need to have a separate table for keeping track of
the inboxes, since all emails are getting stored upon arrival and anyone
can access all mails from any rcpt address.

also, added a arrived_at column, as a utc unix timestamp. This serves
the obvious reason to have a ts on an email, but also allows this
service to delete old mail.
2024-02-20 00:42:00 -03:00
Guilherme Rugai Freire
369115d781
initial commit 2024-02-18 01:26:53 -03:00