Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: How do services like Substack and Beehiiv send email?
2 points by boeing767 on April 15, 2023 | hide | past | favorite | 13 comments
I'm looking to start a similar service, can I just use a bulk mailing API like Mailgun?

Is that how it works?




Pretty sure substack uses mailgun. If you dig substack.com for mx and txt records you’ll see that their spf includes mailgun and their mx records point to the same as well.


Oh, seems strange for them not to spin up their own mail-sending server.

Why not do that?

They're funded to the gills.


Their business is not sending emails, and until it becomes cheaper for them to DIY it most companies will outsource stuff that doesn't give them a competitive advantage.


Can you not use sendmail with appropriate DNS/DMARC records flashing the requisite badges? No need to make more work for yourself.


> Can you not use [complex technical sultion] > No need to make more work for yourself.

Recommending somebody to 'just use' some complex technical solution is a very typical and dare I say naive HN response.

Properly running an email service is a hard technical task. The days of just installing sendmail and expecting your email to actually arrive are long gone. Properly running an outbound email service requires knowledge on many domains (networking, system administration, DNS, cryptography, etc. etc.). It also requires plenty of maintenance.

So unless you are actually building an email service, just use a third party like Mailgun and focus on the product that you actually want to build.


I don't want to sound stupid, but I don't know what you mean.

What's sendemail?

Also I don't know anything about badges.

But I think you've pointed me in the right direction.


https://en.m.wikipedia.org/wiki/Sendmail

I would suggest against this if you don’t know what you are doing. Dealing with email deliverabolity and reputation is a nightmare. Talk to someone at sendgrid/mailgun/mandrill/etc and focus on more important parts of your service.


Okay, what happens if there are bad actors among my users who use my service to send Nigerian prince emails or boner pill ads?

How will that affect my relationship with Sendgrid?


Depends on the service, but all of these services will try to deal with reputation damage by a series of preemptive and reactive actions.

Preemptive being checking the emails before they go out for malicious links etc, and reactive being checking the deliverability (delivered, bounced) as well as optionally email actions (open, click, ubsubscribe, flag) and stopping the account from sending further emails if something bad is happening.

This last part "blocking the account" is what will save you from waking up one sunday morning to find out your domain has been added to all spam lists and no one wants your emails any more. -- This can be even done on a per-sending-account basis. ie Each of you clients can have their own subaccount in these providers and only the infringing account will be impacted.


good advice. if doing this would slow OP down, use a turnkey service.


no worries brother. sendmail is an email utility that runs on your server. You can tell it to do whatever you want. (and there are many alternatives that do this too) Basically it sends whatever you want as an email.

Badges: When you send an email, you're sending to the recipient's email server--gmail.com or whitehouse.gov or whatever. But these servers get a billion spam messages a day, so you need to prove you're really boeing767.com, else most of your messages will get flagged as spam. This is typically done by adding SPIF and DKIM (special DNS records) for whatever domain you use, e.g. boeing767.com

Chatgpt can pretty much write the code do this this (or get you up to speed on how it all works) if you don't want to spend a bunch of time on it.


Chatgpt can pretty much write the code do this this

And confidently get it wrong in this case. This is an example of why ChatGPT and others like it need a debug function to show their work/sources. Can you spot the errors and missing data?


I wouldn’t trust IP reputation to ChatGPT.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: