puter icon indicating copy to clipboard operation
puter copied to clipboard

Puter mail (self hosted local mailling)

Open Zac0511 opened this issue 1 year ago • 4 comments

I was (again) thinking of a feature for self hosted that would allow users to send mails across the local network to other users. They could send text and files across the local network, and this could work if 2 different users are logged at the same time, or if only one is logged. Received and sended mails by an user could be stored in a new .mail folder in the user's home folder. The folder could look like this in the inside (i put example usernames and UIDs) :

  • /[username]/.mail
    • received
      • joe3985
        • mail-2024-07-11-1016.txt
        • attachments
          • e74c5cd8-6deb-4329-911f-0b81d923ab3d.png
          • fc0f6cb6-94f9-4bdb-8f16-d5a6ac73a33d.log
    • sended
      • naribuildsstuff
        • mail-2024-07-11-1018.txt

Filenames : Mail : mail-[year]-[month]-[day]-[hour & minutes].txt Attachment : [UID].[extension]

Example content from /[username]/.mail/received/joe3985/mail-2024-07-11-1016.txt :

[FROM: joe3985]
[TO: [username]]
[DATE: 2024 07 11 10:16]

[OBJECT: i love Puter]

[CONTENT:]
You know i really like **Puter**, here a screenshot i made in it : ![image](e74c5cd8-6deb-4329-911f-0b81d923ab3d)
I also got a little problem, so here's my log in case you can find the problem with it : ![file](fc0f6cb6-94f9-4bdb-8f16-d5a6ac73a33d)

The mails could support markdown, thats why i added "**".

This whole file would only be read by the mail app, and the information would then show in a clean way on the UI, like on Gmail, Outlook, etc...

When sending a mail, the user will see a list of all the users on the server, and can type an username if needed. In case someone (like admins if they exist with https://github.com/HeyPuter/puter/issues/580) don't want to be in the list, they can disappear from the list with a setting in the mail app, but they will still be able to receive mails by typing their username.

Zac0511 avatar Jul 11 '24 08:07 Zac0511

We've discussed this idea before actually. This will be a good intermediate feature before we implement some kind of instant messaging in Puter, or maybe something that could continue to exist alongside that.

One important consideration is you shouldn't be able to exhaust another users storage by sending them many/large messages. Instead the mail app can look for a shared directory from the other user.

KernelDeimos avatar Jul 11 '24 20:07 KernelDeimos

We've discussed this idea before actually. This will be a good intermediate feature before we implement some kind of instant messaging in Puter, or maybe something that could continue to exist alongside that.

One important consideration is you shouldn't be able to exhaust another users storage by sending them many/large messages. Instead the mail app can look for a shared directory from the other user.

Oh yeah. In that case, the folder directory could look like this :

  • /mail
    • Zac0511
      • received
        • joe3985
          • mail-2024-07-11-1016.txt
          • attachments
            • e74c5cd8-6deb-4329-911f-0b81d923ab3d.png
            • fc0f6cb6-94f9-4bdb-8f16-d5a6ac73a33d.log
      • sended
        • naribuildsstuff
          • mail-2024-07-11-1018.txt

And then, the mail app would be able to access the folder corresponding to the user's username, and display everything on the UI

Zac0511 avatar Jul 12 '24 06:07 Zac0511

Related: #337

secondtruth avatar Jul 13 '24 11:07 secondtruth

@Zac0511 we were also discussing (as did @secondtruth) how elegant the file-only approach is. We have a very fast filesystem that allows us to do this file-only approach.

jelveh avatar Jul 13 '24 15:07 jelveh