this post was submitted on 20 Mar 2024
25 points (96.3% liked)

Rust

5980 readers
101 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 1 year ago
MODERATORS
 

Hey all,

I'm going to be moving on to my next project and have been thinking about doing an email client. I like Thunderbird, but the search is terrible, and I also want to tackle something that needs pretty high performance for processing emails etc.

Any suggestions or considerations I should think about?

I'll focus on just getting SMTP going in a CLI then I'll introduce some sort of frontend using Qt.

you are viewing a single comment's thread
view the rest of the comments
[–] onlinepersona@programming.dev 1 points 7 months ago (2 children)

It could be worth making it a lib upon which a frontend can be built. For example any logic that goes into retrieving and sending emails, storing data, loading configuration, etc. would be in the lib and whichever frontend somebody wants to tack on would use that lib - TUI, GUI, CLI, web, whatever.

You might want to make it somewhat protocol agnostic. SMTP is used by probably most services, but more and more are using APIs. IINM gmail is oauth and uses the gmail API. Tutanota and Protonmail use their own APIs, but maybe their clients and the proton bridge unveil those somewhat.
Regardless, making it protocol agnostic would allow contributors or third-party authors to add new transports.

Also, slint allows for quite good UI development in rust. I'm not sure yet how good they are with smaller screens, but IMO a client that works on desktop and linux mobile would be awesome.

CC BY-NC-SA 4.0

[–] Matty_r@programming.dev 2 points 7 months ago

Slint looks pretty cool. Has a very strong material UI feel to it.

[–] teotwaki@lemmy.world 1 points 7 months ago (1 children)

I think you’re misguided about the APIs. Gmail supports IMAP and SMTP. Proton supports those too if you run an encryption bridge on your computer. Fastmail supports IMAP/JMAP/SMTP (they invented JMAP to try and innovate).

Email providers most likely must provide SMTP and IMAP due to compatibility requirements with Apple Mail and other clients.

[–] onlinepersona@programming.dev 1 points 7 months ago (1 children)

I tried setting up KMail, Thunderbird, and another email client whose name I can't remember, to use gmail, but they refused to work. Back then the thunderbird doc said something about using APIs instead IMAP+SMTP because google had deactivated "insecure apps". Maybe they undid that? Dunno. Was about a year ago. Possibly because it was locked down at org level, but that would be a valid usecase for using API.

Proton's bridge is 10€ a month or something, but there's API access to proton regardless of price. Didn't know Fastmail had SMTP/IMAP.

CC BY-NC-SA 4.0

[–] teotwaki@lemmy.world 1 points 7 months ago (1 children)

First sentence on the first hit when searching for “Gmail smtp imap”:

For non-Gmail clients, Gmail supports the standard IMAP, POP, and SMTP protocols.

https://developers.google.com/gmail/imap/imap-smtp

What you’re referring to is the fact that GMail has apparently disabled authentication using username + password for SMTP/IMAP. I would assume that application passwords still work fine as a workaround, even if they don’t mention it specifically.

[–] onlinepersona@programming.dev 1 points 7 months ago

What you’re referring to is the fact that GMail has apparently disabled authentication using username + password for SMTP/IMAP. I would assume that application passwords still work fine as a workaround, even if they don’t mention it specifically.

Oh, yes that might be it! There is a hope again to using a third-party email client! The gmail web client is decidedly not my favorite.

Thanks!

CC BY-NC-SA 4.0