Saas: Sending Emails from Client's Domain

Hiya Bubblers!

I’m working on a Saas app that requires Users are able to send emails from their own email addresses (not from the domain my app is running on).

I’ve seen this done in plenty of Saas apps I’ve used myself where you authenticate yourself as a sender etc. using DNS.

So, question: Has anyone had any success implementing this (connection to a custom domain as a sender) using Bubble?

@simonpurdon10 Bubble suggeest setting up send grid for custom domain emails. Email - Bubble Docs

You can set it inside send grid to send a diffrent domain than your app is running on.
Or just set an API call to a third party app.

In your case, you will need to integrate sendGrid or postmark.

Neither are applicable.

I want to send emails from a domain that is not my domain.

Ah, thats not possible. It would be really shady, doubt that a email service lets you do that.

Hi @simonpurdon10,

You can accomplish this using Postmark’s API. Basically, you would leverage Postmark’s API to add a new domain into your account (i.e., your client’s domain). They would then need to verify their domain and add DKIM records along with a return path.

With the Postmark API, you can even run a call to check if the domain has been verified yet. Once the domain has been verified is when you can start sending from your client’s domain. This option allows better deliverability than the alternative I’ll go into below but does require technical setup on the user-end.

The alternative option that provides less optimal deliverability rates is adding your client’s email as a sender signature via the API. When that request is put through, Postmark will send your client an email to verify their email. Once your client verifies their email with Postmark, you can start sending, but DKIM won’t be setup, so the email won’t exactly be authenticated hence the poorer deliverability rates. However, this is less technical for your clients.

This is excellent thank you. My skills with APIs is currently basic as I haven’t had much experience, do you know if there’s a step by step on how to leverage Postmarks API to achieve all this? Thanks for your time

I do not, but to break it down:

  1. Use the Create Domain API call to add your client’s domain to your Postmark account for sending: Domains API | Postmark Developer Documentation

  2. Use the Get Domain Details API call to get the DKIM and return path; basically the values needed to be inputted into the client’s DNS records: Domains API | Postmark Developer Documentation

  3. Using the Verify DKIM records API call, you can check if the domain’s DKIM has been added: Domains API | Postmark Developer Documentation

  4. Using the Verify Return path API call, you can check if the domain’s return path has been added: Domains API | Postmark Developer Documentation

1 Like

Thank you!! Exactly what I’m looking for.

Nothing shady about it.

Thanks so much for this. Will give it a go now.

BTW for anyone reading this thread, Postmark’s customer service is really excellent too!

1 Like

:100: @bettina

1 Like

I am also looking for a similar solution and haven’t found one yet. Being a SaaS app, there would be 00’s of customers hence one needs to set up as many accounts with Postmark? Also, if you want your customers to get responses within your app for the mails sent, can the Postmark API work? I don’t think so…

cc @johnny

One Postmark account is needed.

“You can have as many Signatures and Verified Domains as you need, there is no limit.”

Yes! Postmark provides inbound email processing!


Does anyone have some screenshots of setting up the API with Postmark please? I’m genuinely so lost and can’t get past step 1 of @johnny 's super helpful post. I know I’m the issue here lol, and it probably makes complete sense to everyone else. I just can’t get the API to initialise
Thanks in advance

Hi @LA81638,

Have you had the chance to look at this video Bubble filmed?

It may help better your understanding of APIs and how they can be worked into Bubble.

1 Like

Johnny, further to this thread: can these emails sent n responses received through bubble app be also accessed through user’s web app? Like Gmail , etc. with their own domain? If yes then, what about gmail free accounts? Thanks :pray:

Hi @narayan,

I’m not quite understanding your question. Are you asking if emails sent from a custom domain will a hit a user’s inbox (i.e., gmail)? If so, yes.

1 Like

Does this work for more than one client domain? In other words, if I have 10 clients, can they each connect their domain to their own account in my app and I send emails to them via Postmark?

I’ve read on another forum that Postmark works well for sending from a single client email, but at scale it’s difficult for some reason?

Yes you can build an interface where they connect their domain and create new Sender Signatures, etc.