CLI email clients are so fucked because email is so fucked. Like, I want to just have `cat body.txt | email send --to example@example.com` `email list --from example@example.com | less`

@mauve

I do this kinda stuff routinely using the `mail` command from mailutils. If postfix is installed you can do similar with `sendmail -t` just like back in the old days.

For example: ```
mail -s "Email Subject" -a "From: sender@example.com" recipient0@example.com recipient1@example.com < body.txt
```

Or: ```
{
cat << EOF
To: recipient0@example.com, recipient1@example.com
From: sender@example.com
Subject: Bla bla bla

EOF
cat body.txt
} | sendmail -t
```

This could also easily be wrapped into a shell script to provide the exact command syntax you want. Though that's presuming you also have an smtpd setup on that system with proper SPF, DKIM, DMARC, TLS, and so on. If you need authentication to an external smtpd then it can be a bit more of a challenge, but arguably still doable if you open a socket and send the raw SMTP messages via your shell script.

@toiletpaper Sending mail I think is the easier part, although doing the configuration is IMO a major pain in the butt still (compared to graphical interfaces). What do you use to read the mail back? I find the split between sending/loading/reading to be a bit overwhelming.

@mauve

It depends on whose system I'm on, but generally I just use mutt. I have a bunch of different aliases and macros for doing stuff like view attachments, stripping html, etc. If mutt's not installed I just use `mail`. For a daily driver, it's mutt. If I'm on the road, I have a copy of roundcube setup.

@toiletpaper Hmm, mail might do the trick. In my case I can't use TUIs because I'm interfacing through a terminal screen reader and dynamic rendering messes with its readback.

By mail you mean s-nail? Do you know of any tutorials for doing a complete setup with it?

@mauve

I've not used s-nail personally. Nor do I have much experience with screen readers beyond a couple decades back helping a couple blind friends with a few things. But email wasn't part of the help. What screen reader do you use?
Follow

@toiletpaper I see. I think s-nail is pretty much a more recent version of the same interface. It's bundled with arch which I use on most of my boxes these days. man.archlinux.org/man/mail.1.e

· · Web · 1 · 0 · 1
@mauve

Well I can't guarantee I'd be able to help with everything, but if you get stuck, don't be afraid to reach out.
Sign in to participate in the conversation
Mauvestodon

Escape ship from centralized social media run by Mauve.