Commit Graph

15 Commits

Author SHA1 Message Date
Guilherme Rugai Freire
e9cb98eb50
make nthmail a link and addr copiable 2024-07-21 01:07:50 -03:00
Guilherme Rugai Freire
20842416b8
make index responsive 2024-07-21 00:56:37 -03:00
Guilherme Rugai Freire
9ec0af6278
add footer 2024-07-20 20:52:49 -03:00
Guilherme Rugai Freire
a88e5e90dc
parse mail subject when receiving and saving to db
this way, when the inbox route is called, there is no need to parse all
mails neither request them from db just so it can have their subject
2024-07-18 22:10:35 -03:00
Guilherme Rugai Freire
30b727b9ce
parse mail content-enconding on text/* mails
before, if the mail content-type was text, it would not consider the
content encoding, only if it was multipart.

now this step on the mail parsing is performed both on multipart mails
and in text mails
2024-07-18 12:37:19 -03:00
Guilherme Rugai Freire
444e3d877e
fix plain txt mails not parsing the mail body
the problem was that it was declared a byte array (txt) with
essentially size 0 and calling Read(txt). Since Read reads n
bytes up to sizeof(txt), nothing was being read.
2024-07-17 11:27:02 -03:00
Guilherme Rugai Freire
7999d35a32
return 404 not found on email not found, not 500 2024-07-10 23:33:10 -03:00
Guilherme Rugai Freire
a4efa6a35f
add dockerfile 2024-07-10 22:15:18 -03:00
Guilherme Rugai Freire
4fec4e8bd0
remove logs when receiving mails 2024-07-10 19:09:54 -03:00
Guilherme Rugai Freire
fc899da74c
add go fmt format.sh script 2024-07-10 19:01:31 -03:00
Guilherme Rugai Freire
8ef8cf75ef
sanitize html with bluemonday 2024-07-10 17:31:09 -03:00
Guilherme Rugai Freire
48e7b5a9a5
integrate web and mail server
now, there is only one binary that starts both servers,
making them use the same SQL connection.

this commit also added some `defer tx.Commit()` to ensure
all the transactions were closed
2024-07-10 16:56:46 -03:00
Guilherme Rugai Freire
52b3fa61ca
style web pages 2024-07-10 16:02:03 -03:00
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
95252f12f5
add index page and button to generate random inbox 2024-02-20 17:59:47 -03:00