Best email API for Next.js apps?

Part of my product is supposed to let users send/receive emails using a custom domain (which they would buy elsewhere like Namecheap) but I'm not sure which ESP would have the best API for me to use. Any input is appreciated!
12 Replies
Kevin Powell
Kevin Powell•4mo ago
Email is a bit of a different game and takes a fair amount of configuration from the user. There are a lot of good services for sending emails from domains you have control of, but having them go out from user domains is a completely different story.
Jake
JakeOP•4mo ago
I'd imagine they'd need to point their DNS towards us and generate MX records? I think I went through a similar process a few years ago with Google Workspace (G Suite back then).
Kevin Powell
Kevin Powell•4mo ago
Yup! You also need to worry about dmarc these days too, which is for email authentication. It prevents email spoofing, and now several email providers (including gmail) will mark most emails coming in that don't have it set up as spam. There used to be ways around a lot of this, where esp would simply send an email verification and, as long as the user accepted it, you'd be able to send through their domain. I'm pretty sure you can still do this, but it would result in everything going to spam. It's too easy to exploit, so it's not really a viable option anymore. I don't know what exactly you want to do with your app, some more info on that side of things could be useful 🙂
Jake
JakeOP•4mo ago
Ouch, this might be why I HoneyBook's deliverability is garbage nowadays 😅 If APIs aren't a viable option anymore due to everything going to spam, I might need to look for a way to integrate with Google Workspace instead so users can send/receive emails through the front of our app but have their actual setup on Google Workspace.
Kevin Powell
Kevin Powell•4mo ago
Email deliverability is a nightmare, and I'd never want to run something that would involve sending emails, lol.
Jake
JakeOP•4mo ago
How about simpler implementations like automated follow-up emails? I'd imagine that'd be easier to set up using something like Mailgun? Or would you still run into the same deliverability risks?
Jochem
Jochem•4mo ago
seconded. I deal with some software at work that has a password reset email and the ability to send files to the software using email, and both work 99% of the time for 99% of people, but if it breaks for any individual, it's "check spam" and then "It works for everyone else, sorry". It's a nightmare to debug if you're relying on it too, cause you're constantly bouncing between your own software and the various email servers and spam mitigation services and it's all usually purposely vague to make spammers unable to adapt, but that also means you as a sysadmin/developer can't adapt either.
clevermissfox
clevermissfox•4mo ago
What is your target user profile? Are these devs of some kind that xould follow config instructions or civilians that would have no idea how to work with cloud console or DNS records ? But also email is a nightmare and if you can avoid this feature I would also opt to nix it if possible
Kevin Powell
Kevin Powell•4mo ago
mailgun or sendgrid are two high-quality services that could work... there are some others too. Looking at mailgun, you'd at minimum need to be on their $35 plan, but for some reason that doesn't include email verifications. You'd want to be protecting your sending reputation, which that does, so you'd want to add that on or go at the higher plan. I think sendgrid is similar, only adding it at higher tiers too... It's all doable, but if it's not an essential feature, I doubt it's worth the amount of trouble it's going to cause, lol. It might be an essential feature, in which case, just know you'll be doing a lot of help for things that have nothing to do with your app. Even if users are knowledgeable, email is a pain in the ass, and different services have different ways of having to set it up, so you end up having to guide users through all of that.
Jake
JakeOP•4mo ago
Somewhere in between, usually consultants who would be able to point their DNS towards a Google Workspace account when setting up a business email that way Yeah definitely seems like a big investment in terms of both time and money not to mention support due to the variance between different services. Might not be worth implementing. Plus for reminder/follow-up emails I could always just send them out from our own email address then let users change the sender name to "[user] from [company]" probably. So while the reminder email comes from our email address, it at least contains their name and company.
Kevin Powell
Kevin Powell•4mo ago
heads up, I use google workspace and recently had to use it for something that didn't involve setting up a DNS record and it involves going into your primary account 2fa (not the admin account settings, where the smtp stuff is), and adding an app, which creates a 1-time password that isn't saved anywhere, which has to be used as the password... and there is no documentation around this from google as far as I could find. I ended up on some random github issue that helped me solve it. this can definitely work, but I know a few services that did offer something like this that recently heavily reduced the capacity here. Supabase is the big one. They went from, I think 100 emails/day to 5. I'm not sure if it has to do with the new dmarc stuff, or if they just didnt want to have to deal with email or not, so I don't want to say it's not an option, but when I see this happen I assume there is a reason 😄 again, email is hard, lol. There are ways to do this, but you really need to do your homework and make sure it's done right.
Jake
JakeOP•4mo ago
Geez that's horrible UX design Yeah email seems like a pain, might be easier to just put their name in the subject line or body text so I don't have to limit capacity
Want results from more Discord servers?
Add your server