this post was submitted on 18 Aug 2023
23 points (89.7% liked)

Selfhosted

40708 readers
406 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

I have an e-commerce website that needs to send emails to my clients to confirm shipping... Do you have any free software to advise to send emails with a rest API? Thanks

all 20 comments
sorted by: hot top controversial new old
[–] [email protected] 23 points 1 year ago (2 children)

I highly recommend not wasting time on this and using something like sendgrid. The cost is so little and you'll save an inordinate amount of time

[–] [email protected] 12 points 1 year ago

Not to mention if this is for an e-commerce site, the last thing you want is not having emails delivered into inbox. Nothing screams sketchy seller more than customers finding your email in spam.

[–] [email protected] -1 points 1 year ago

Yes, I use mailgun, thank you

[–] [email protected] 20 points 1 year ago (3 children)

The biggest problem is not getting your application to send mail, but to get the mail into the inboxes of people and not spam. That is what you pay the big providers for. Email is broken in that way. I'd advise you to go for a paid service if you want your emails to reliably arrive.

[–] [email protected] 6 points 1 year ago (2 children)

Though I agree with the points in isolation, this entire defeatist attitude is what created this problem in the first place. Within the last year I starting running my own email server with no previous experience or knowledge on the matter. I have learnt an incredible amount about the technology and unfortunately the disadvantages that come with it along with the monopolies by big corporations that have defacto control over the email infrastructure on the internet.

It is ironic that I have at times had my email server blocked for no reason by say Microsoft/Google but my sever has never sent a single spam in its entire history of its short existance; which itself is part of the problem (it has very low reputation); and yet 90% of email spam on the internet and especially what I have always recieved comes from email addresses hosted from those two big email providers; yet they never dare block each other.

I am annoyed by the actions of the earlier self-hosted email server administrators that in the past never made a decent and sustained effort to challenge these big corporations in the email space and help protect it from monopolisation. If they had made the effort that people such as Louis Rossman and others are making for sake of Right to Repair we wouldn't be in a situation where self-hosting your own email server is such a pain in the arse because large corporations can block internet transfer of emails at a whim for no other reason because they feel like it.

[–] [email protected] 6 points 1 year ago* (last edited 1 year ago) (2 children)

Eh, I wouldn't go about 'the self-hosted admins didn't do anything!'. There never really was a time when the majority (or even a meaningiful minority) of users hosted their own email.

In the beginning, you got your email address from your school or your ISP, and it changed whenever you left/changed providers, so the initial "free" email came from the likes of Hotmail (which rapidly became Microsoft), Yahoo (which was uh, Yahoo), and offerings from the big ISPs of the era, like AOL and whatnot.

You still had school and ISP email, but it just rapidly fell out of fashion because your Hotmail/Yahoo/AOL email never changed regardless of what ISP you used or whatever, so it was legitimately a better solution.

And then Google came along with Gmail and it was so much better than every other offering that they effectively ate the whole damn market by default because all the people who were providing the free webmail at that time didn't do a damn thing to improve until after Google had already "won".

So if you want to be mad, this is firmly Microsoft and Yahoo's fault for being lazy fucks.

[–] [email protected] 2 points 1 year ago

I agree that is sucks but my advice is purely practical. I try to be principled where I can but email is a lost cause in my opinion. I have hosted my own Mailserver. I encountered providers that only have allow lists and needed me to manually apply to allow my mail in. You have to build a reputation to not be marked as spam. Someone can just submit your domain to a block list and you have to find out how to get removed. It is a mess.

The cold hard truth is that if you want your mail delivered reliably, don't host yourself.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago)

You could be right. I am sure the entire situation was a lot more nuanced then I portrayed it in my previous post. And I am sure many of the email admins for companies had a lot more localised pressing technical issues to deal with for the companies they worked with then having the time to ponder on the implications of email centralisation from other businesses.

I will always promote technological independence though. And despite the hurdles that come with running any technological service locally/privately whether it be an email server or otherwise it is ultimately worth it for those who need/desire the full control and privacy of ones own data. At-least that is my 2-cents.

[–] [email protected] 3 points 1 year ago* (last edited 1 year ago)

Not to a be a dick but this question (self hosted email) is answered weekly….

[–] [email protected] 1 points 1 year ago

Agreed, there are plenty of mail services that are geared for just sending only on your behalf. They'll make sure your mail is secure and actually gets to the recipient's mailbox instead of getting booted as untrusted spam.

[–] [email protected] 3 points 1 year ago (1 children)
[–] [email protected] 1 points 1 year ago

No, but because of the reputability that I need I chose a service.

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago)

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

Fewer Letters More Letters
HTTP Hypertext Transfer Protocol, the Web
IMAP Internet Message Access Protocol for email
SMTP Simple Mail Transfer Protocol

3 acronyms in this thread; the most compressed thread commented on today has 5 acronyms.

[Thread #65 for this sub, first seen 19th Aug 2023, 04:55] [FAQ] [Full list] [Contact] [Source code]

[–] [email protected] 2 points 1 year ago

I recommend using ssmtp, a CLI client to send emails using an existing email provider. One, out of many pages explaining how to use: https://wiki.archlinux.org/title/SSMTP

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago) (1 children)

A lot of "degoogling" talk has discussed how to degoogled email in a graceful way (Gmail has huge market share). Let me find that community.

Edit: https://sh.itjust.works/post/3044652

Edit: based on that post, you probably want fastmail to selfhost. Now the official API of mail clients is jmap, so it may not be "rest" and you may not be able to find a "reliable" rest api

Edit final: check this out https://en.m.wikipedia.org/wiki/Comparison_of_mail_servers And I still don't know what ones have a rest api.

[–] [email protected] 3 points 1 year ago (1 children)

I think JMAP (the IMAP successor) is the best choice here. It was designed to be an open alternative to the proprietary APIs offered by Gmail and the like. It offers a JSON API that clients can talk to using HTTP. The JMAP website has some examples: https://jmap.io/crash-course.html

So it seems that a simple server that implements JMAP would be what the OP is looking for, perhaps https://github.com/stalwartlabs/mail-server (which also supports SMTP/IMAP for compatibility with other clients)?

[–] [email protected] 2 points 1 year ago

Was going to say the same thing.

[–] [email protected] 1 points 1 year ago (1 children)
[–] [email protected] 1 points 1 year ago

Yes, but it's too expensive. I chose Mailgun because I already used it with the student offer.