HubSpot transactional email: route it through your own domain with MailKite
HubSpot's transactional email uses its own SMTP infrastructure — your emails come from HubSpot's domain, not yours. This tutorial shows how to switch to MailKite's SMTP relay so every transactional email is DKIM-signed from your domain, with full deliverability control and CRM activity logging for inbound replies.
HubSpot sends your transactional email from HubSpot’s infrastructure. Password resets, form confirmations, workflow-triggered emails — they go out through HubSpot’s SMTP, with HubSpot’s DKIM signature, from HubSpot’s IP. Your brand name is there, but your domain’s reputation isn’t doing the work.
For marketing emails, this is fine — HubSpot’s deliverability team handles it. For transactional email, it’s a problem. Your customers expect password resets and form confirmations to come from you, not from a platform they’ve never heard of. And when Gmail sees a From: you@yourcompany.com email signed by HubSpot’s key, DMARC alignment fails.
MailKite fixes this. Here’s how to route HubSpot’s transactional email through your own DKIM-signed domain.
The problem with HubSpot’s default
HubSpot’s transactional email product sends through its own SMTP servers. When you configure a sending domain in HubSpot, it sets up DKIM under HubSpot’s key — not yours. This means:
-
DKIM alignment fails. The signature is
hubspot.com, notyourcompany.com. DMARC requires the signing domain to match theFromdomain (or be a subdomain of it). -
SPF may fail. HubSpot’s sending IP isn’t in your SPF record. If you haven’t added HubSpot to your SPF, the email gets a hard fail.
-
No visibility. HubSpot shows open/click rates for marketing email but has limited delivery diagnostics for transactional sends.
The fix: use MailKite as the SMTP relay for HubSpot’s transactional email, so every message is signed with your DKIM key.
The setup
1. Verify your domain in MailKite
Add your domain to the MailKite dashboard. Publish the DNS records (MX, SPF, DKIM, DMARC). This takes under 5 minutes.
2. Configure HubSpot’s SMTP
In HubSpot, go to Settings → Transactional Email → Sending Domain and add your verified domain. Then configure the SMTP relay:
| Setting | Value |
|---|---|
| SMTP Server | smtp.mailkite.dev |
| Port | 587 |
| Username | mailkite |
| Password | Your API key (mk_live_…) |
| TLS | Required (STARTTLS) |
HubSpot’s transactional email API can also send directly — but SMTP gives you the same MailKite pipeline (DKIM signing, logging, retries) as every other integration.
3. Verify DKIM alignment
Send a test transactional email (trigger a form submission, password reset, or workflow). Check the headers in Gmail:
Authentication-Results: mx.google.com;
dkim=pass header.d=yourcompany.com
spf=pass
dmarc=pass
All three should pass. If DKIM shows header.d=hubspot.com instead of your domain, the relay isn’t configured correctly.
When to use SMTP vs HubSpot’s API
HubSpot’s transactional email has two paths: SMTP and the API. Here’s when to use each:
| Use SMTP when… | Use HubSpot’s API when… |
|---|---|
| You want zero config — point and send | You need HubSpot’s email tracking (opens, clicks) |
| You’re sending from a non-HubSpot app (Laravel, WordPress, etc.) | You want email to appear in HubSpot’s timeline automatically |
| You want MailKite’s deliverability controls and logs | You’re building marketing sequences inside HubSpot |
| You need inbound email routing (replies → CRM) | You’re using HubSpot’s template editor exclusively |
The key insight: SMTP is org-wide. Once configured, every HubSpot email — workflows, sequences, transactional — routes through MailKite. The API path is per-email and requires code.
Receiving inbound email → HubSpot CRM
When a customer replies to your email, MailKite can POST the reply to a webhook. This example creates a note on the matching HubSpot contact:
// hubspot-webhook.js — Cloudflare Worker or any serverless platform
export default {
async fetch(request, env) {
if (request.method !== "POST") return new Response("OK");
const payload = await request.json();
const { from, subject, text } = payload;
// Look up the contact by email
const searchRes = await fetch(
"https://api.hubapi.com/crm/v3/objects/contacts/search",
{
method: "POST",
headers: {
Authorization: "Bearer " + env.HUBSPOT_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
filterGroups: [{
filters: [{
propertyName: "email",
operator: "EQ",
value: from,
}],
}],
properties: ["email", "firstname", "lastname"],
}),
}
);
const { results } = await searchRes.json();
if (!results.length) return new Response('{"ok":true}', { status: 200 });
const contactId = results[0].id;
// Create a note on the contact
await fetch(
"https://api.hubapi.com/crm/v3/objects/contacts/" + contactId + "/associations/notes",
{
method: "POST",
headers: {
Authorization: "Bearer " + env.HUBSPOT_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
properties: {
hs_note_body: "<b>Inbound email</b><br>Subject: " + subject + "<br><br>" + text,
hs_timestamp: Date.now().toString(),
},
}),
}
);
return new Response('{"ok":true}', { status: 200 });
},
};
Set your domain’s webhook to this endpoint. Every inbound email becomes a CRM activity — visible on the contact’s timeline, tied to the right person.
How it compares
| HubSpot default SMTP | MailKite SMTP relay | |
|---|---|---|
| DKIM signature | HubSpot’s key | Your key |
| SPF alignment | May fail (HubSpot’s IP) | Passes (your domain) |
| DMARC alignment | Fails | Passes |
| Sending reputation | HubSpot’s shared pool | MailKite dedicated |
| Delivery logs | Limited | Full dashboard + API |
| Inbound email | Not supported | Webhook → CRM note |
| Cost | Transactional Email add-on | Free tier included |
FAQ
Do I need HubSpot’s Transactional Email add-on? HubSpot’s SMTP relay is part of the Transactional Email product. On Free/Starter, you may need the paid add-on. If you don’t have it, you can still use the MailKite API from an external app to send transactional email triggered by HubSpot workflows.
Will this affect my marketing emails? No. Marketing emails go through HubSpot’s marketing email infrastructure, not the transactional SMTP relay. They’re separate systems.
Can I use MailKite for marketing email too? MailKite is for transactional email. Marketing email (newsletters, campaigns) should go through HubSpot, Mailchimp, or your ESP. The two can coexist — different systems, same domain.
Route HubSpot’s transactional email through your own DKIM-signed domain. Start free — unlimited domains, no credit card.
Related: Salesforce email relay with MailKite — the same pattern for Salesforce · Fix WordPress email deliverability — SMTP on a different stack · What is programmable email? — why round-trip matters