Intercom + MailKite
Intercom is a customer messaging platform. Use MailKite to receive inbound email as Intercom conversations — customer support requests land directly in your Intercom inbox.
What you need
- A verified domain with SPF + DKIM published
- Your API key (
mk_live_…) - Intercom workspace with API access
Send email
Use MailKite SMTP for outbound transactional email; use Intercom for conversational replies.
smtp-config
# Use MailKite SMTP for transactional email
# Use Intercom for conversational outbound replies
SMTP Host: smtp.mailkite.dev
SMTP Port: 587
SMTP Username: mailkite
SMTP Password: mk_live_...
From: hello@yourdomain.com Receive inbound email (optional)
Point your domain's webhook to this handler. Inbound email creates an Intercom conversation.
handle-inbound.ts
// Receive inbound email → create Intercom conversation
const INTERCOM_API = 'https://api.intercom.io';
async function handleInbound(email) {
const res = await fetch(`${INTERCOM_API}/conversations`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${process.env.INTERCOM_ACCESS_TOKEN}`,
'Intercom-Version': '2.11',
},
body: JSON.stringify({
from: { type: 'user', email: email.from },
body: { type: 'text', text: `Subject: ${email.subject}\n\n${email.text}` },
}),
});
return res.json();
} Test it
terminal
curl -X POST https://your-worker.example.com/mailkite-inbound \
-H "Content-Type: application/json" \
-d '{"from":"customer@example.com","to":"support@yourdomain.com","subject":"Help needed","text":"I can\'t log in."}' Troubleshooting
- Intercom API requires an access token with
conversations:writescope. - The user must exist in Intercom, or use lead creation instead.
- Check that your Intercom access token is valid under Settings → Developer Hub.
See the SMTP relay docs for the full connection reference, or all integrations for other platforms.