97 points · by petecooper · 2y ago · 87 comments
Plunk's API does not appear to offer any such feature: https://docs.useplunk.com/api-reference/transactional/send
Unfortunately neither does Resend, Sendgrid, Postmark, etc.
I don't even expect them to keep a list of IDs forever, just some best effort like "we don't send anything with the same id twice in a one-hour window"
Gmail's API did support this I believe, and then ofc my org transitioned to Microsoft so my little homemade email service quit working
The solution I ended up with was to build my own pseudo-idempotency around Postmark. It helps that Postmark at least has proper persistence so you can query their API to check if you've already sent a certain email. I had to move away from Mailchimp because, if an email gets queued for some reason, it isn't reflected as sent in the API so there's no way of knowing whether an email is hiding in "queued limbo". Postmark doesn't have this problem.
The only caveat is that there is a delay between sending an email and it being reflected in the API (seems pretty standard across the different services). This means I had to implement a simple database backed lock to make sure I never try to send the same email more than once in quick succession.
It's kind of ridiculous, but.. I couldn't find any alternative.
Edit:
Wonder if it would be worth wrapping something like this up into some kind of a self-hostable proxy service. You'd provide the idempotency key in a header and it would do the rest
Someone doesn't really understand self-hosting.
My guess is Plunk is for people who need a Mailchimp-like offering at a lower-than-Mailchimp price point.
- How will you make sure that only subscribed recipients will get your emails - How will you handle bounces and complaints - How will you monitor your sending
Don't beat around the bush and you will be approved in less than 1 day.
I'm curious to know where you draw your imaginary line.
Those apps using 3rd party auth providers almost universally have them as an optional plugin, allowing you to choose one of a dozen auth providers or your own self-hosted one. You're not tied to any specific 3rd party platform, and rarely tied to any 3rd party platform at all.
For something to be considered self-hosted, If the bombs drop and civilization is over and me, and my home lab are the only survivors, can I still use that software? I'd probably have other concerns in that case, like how am I going to survive nuclear winter, but that's where the imaginary line is.
Other than that, what's your power supply like?
Once you have an external requirement and not option, it is no longer a self-hostable software.
It feels like pedantry to critique that aspect so heavily over spirit v letter.
In my utility room I've got a box running TrueNAS with a pile of hard-drives serving data over SMB and NFS. I've got a bunch of tiny business desktop PCs all set up in a k3s cluster hosting a variety of services for myself, family, and friends. Is this self-hosting?
The entire thing's half-useless without a tiny VPS that provides ingress since I'm behind CGNAT. Speaking of, I've got no way to get bits to and from the internet without my ISPs. I also rely on external services for off-site backups and some other storage. While I run my own IMAP/webmail services, I rely on AWS SES for sending email because managing email deliverability (especially from a shared residential address) is something I just don't have the time and patience for.
I think it's generally more useful to take it to mean "taking more control over your dependencies, data and privacy" without drawing a hard line. If someone migrates their social group off of Facebook and on to their own mastadon/something instance running on a VPS somewhere, I don't see any reason to gatekeep the term "self hosting". Making the goal unattainable just discourages people from making positive steps.
On the flip-side of that, there are those who want the extra amount of customization that can only truly come from owning the entire stack. Or perhaps they already have a high-reputation IP address they have been sending from for years, and a self-hosted solution is necessary to continue with that (barring some transfer of that IP address to the operation of another company). In that case, calling this self-hosted is being disingenuous.
In some ways I see the dependency on SES (or other third party provider) as being a benefit for email hosting, especially for a new venture/property. It's why there is some value in depending on other examples of managed services. But I would be clear about that and not call it self-hosted.
> Plunk is an open-source email platform built on top of AWS SES.
I’m out. That’s everything I needed to know about this project to never look at it again.
Nuances of self-hosting aside, I'd recommend caution looking at that pricing pane.
The disclaimer is:
> Calculated based on the plan that best matches the features of Plunk at 2500 emails per month.
And the author then cites prices of $0.001/email for Plunk and $0.013/email for Sendgrid.
I am neither a user or fan of Sendgrid but that feels like disingenuous anchoring. Sendgrid's free plan is 100/day; if you want to eliminate the free plan entirely and just focus on their cheapest paid option, it's $19.95 for 50K emails — or $0.000399/email, cheaper than Plunk's sticker price.
It's not entirely obvious to me how that $0.013 was even calculated ($0.013 * 2500 = $32.50). Either way, be sure to spot-check against live sticker rates before making a decision there.
So this just makes an opensource email UI not platform
Founder of Plunk here. Yes, Plunk is designed to work with AWS SES. I was not the one that made it hard for folks to self-host their own email infrastructure. SES is simply the cheapest and most reliable option out there. Reminder, we are not talking about a private "let's send 10 emails a day" solution. This needs to deliver marketing emails at scale.
Does that mean you have to use SES, no. The code is open-source, swap it out for another provider if you truly believe that you can do it better. I'm open for contributions.
That's the beauty of open-source.
I can't see anything in the docs about it.
That's an interesting way to see the world...
Nooo, thx........
If I have multiple brands, would I need to set up a separate instance for each one?
AFAIK Microsoft is the only one that offers the feature with Word and Outlook in its Office suite, and even that is very restrictive (besides being downright inaccessible from the newer apps).
https://www.twilio.com/docs/sendgrid/api-reference/transacti...
1: My "close to unity" number comes from my experience with the mailgun APIs, I assume that SES is similar.
Imagine the outrage if your national snail mail carrier were to shred 50% of all mail which didn't have a Premium Protection stamp. Why do we let the big cloud hosters get away with it?
Not if you are paying them for the service.
There are ommercial email services that aren't google/microsoft/aws. My former company used to use one (can't remember the name) that provided you with smtp servers and a set of dedicated IPs per customers that were preused by them to build a good reputation beforehand.
I think the point is not necessary that you have to selfhost email (although it can be done, some people do), but depending on a single vendor through a proprietary service/API.
In the before times, I helped build and was a lead engineer on a team building a delivery platform from scratch, with very minor composition bolted on. (For a time reference, this was before HTML email was even common.)
Some of the lessons from then are very relevant still today. A big one that comes to my mind is 'idempotent' email isn't really possible, because SMTP has no 'send iff message-id has not been received' primitive. You can get to try-send-only-until-2.5.0-code, but even that can be non-trivial engineering. We went to a rather large degree of effort to do that ourselves, since repeat emails are a terrible signal, but I think thats only a marginal benefit to the larger operators.
Idempotent delivery even isn't a direct benefit to advertisers or most sending actors: Primarily, for the majority of the market, they don't really care about duplicated deliveries below some statistical model, since the costs are heavily externalized. Secondarily, since those parts of the industry depend on out-of-band read-indicators, engineering to improve delivery idempotentcy doesn't reflect into a market advantage.
Email's gotten prettier in the two decades since then, but its quality at every point in the stack I think has gotten worse. I routinely have to firewall whole ASNs because the bigger bulk operators (salesforce marketing cloud im looking at you) have no functional mechanism to call out particularly spammy customers, and thats after aggressive greylisting. Sure, the greylisting cuts out >95% of my spam, but the noise level on that last 5% is still horrendous. Forwarding with headers to abuse@ should be a universal paradigm but thats 99% a noop these days.
Given the lesser upside and relative difficulty of the delivery problem, it seems only natural that most of the effort in email platforms these days is in composition. Even if you want to work on the delivery half, with IP reputation, aggressive antispam, and the general enshittification of all things email, the barrier to entry is orders of magnitude higher than it was in 2000. I don't want to say its impossible, but I think you'll have a bad time if you're trying to do it anywhere that doesnt have enough size/inertia or money that email receiving operators choose to negotiate with you rather than preemptively block you.