MailKaka

INTEGRATIONS · EMAIL TYPES

Password reset emails that land in the inbox

Someone who can't reset their password is a user you lose. Send reset links from your own verified domain so they reach the inbox, not spam, and see in your logs whether each one was delivered.

  • 3,000 emails a month free
  • Billed in INR
  • Sent from Mumbai
Inbox · Reset your Acme password

Acme <security@acme.in>

to priya@example.com

Reset your password

We got a request to reset the password for your Acme account.

Choose a new password

This link expires in 30 minutes and works once.

Illustration
SPF pass DKIM pass DMARC pass Delivered

HOW IT WORKS

Live in three steps.

  1. 01

    Verify your domain

    Add the DNS records MailKaka shows you. Usually a few minutes.

  2. 02

    Create an API key

    Keep it in a server-side secret called MAILKAKA_API_KEY.

  3. 03

    Send it from your backend

    One request when someone asks for it. Delivery shows up in your logs.

CODE

Send a reset email from your backend

Create a random token, store only its hash with a short expiry, and email the link. MailKaka delivers it from your domain and records whether it arrived.

  1. 1Create a free MailKaka account. The free plan includes 3,000 emails a month.
  2. 2Add your domain in the dashboard and copy the DNS records it shows, including the _mailkaka-verify TXT record, to your DNS provider. Sending works once the domain shows Verified.
  3. 3Create an API key for that domain. It starts with mk_. Store it as a secret called MAILKAKA_API_KEY, never in frontend code.
reset-password.ts
import crypto from "node:crypto";

// db is your own database layer.
export async function sendPasswordReset(email: string) {
  const user = await db.users.findByEmail(email);
  // Respond the same way either way, so nobody can test which emails have accounts.
  if (!user) return;

  const token = crypto.randomBytes(32).toString("base64url");
  const tokenHash = crypto.createHash("sha256").update(token).digest("hex");
  await db.passwordResets.create({
    userId: user.id,
    tokenHash, // store the hash, never the token itself
    expiresAt: new Date(Date.now() + 30 * 60 * 1000),
  });

  const link = "https://yourapp.com/reset-password?token=" + token;
  const res = await fetch("https://www.mailkaka.in/api/emails", {
    method: "POST",
    headers: {
      Authorization: "Bearer " + process.env.MAILKAKA_API_KEY,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      from: "Acme <security@yourdomain.com>",
      to: [user.email],
      subject: "Reset your Acme password",
      html: resetEmailHtml(link),
      text:
        "Reset your password: " + link +
        "\n\nThis link expires in 30 minutes. If you didn't ask for this, ignore this email.",
    }),
  });
  if (!res.ok) throw new Error(await res.text());
}
reset-email-template.ts
export function resetEmailHtml(link: string): string {
  return `<div style="font-family:Arial,sans-serif;max-width:480px;margin:auto;color:#111">
  <h1 style="font-size:20px">Reset your password</h1>
  <p>We got a request to reset the password for your Acme account.</p>
  <p><a href="${link}" style="display:inline-block;background:#10b981;color:#04120d;
     padding:12px 20px;border-radius:8px;text-decoration:none;font-weight:bold">Choose a new password</a></p>
  <p style="color:#555;font-size:13px">This link expires in 30 minutes and works once.
     If you didn't ask for this, you can ignore this email; your password won't change.</p>
</div>`;
}
Prompt for Lovable, Bolt, Replit or Cursor
Add a "Forgot password" flow to this app that sends the reset email through MailKaka (Resend-compatible API, reference: https://www.mailkaka.in/docs.md).

1. Use my MailKaka API key from a backend secret named MAILKAKA_API_KEY. Never put it in frontend code.
2. On "Forgot password", generate a random token, store only its SHA-256 hash with a 30-minute expiry, and send a POST to https://www.mailkaka.in/api/emails with from "<App name> <security@MY-DOMAIN>", the user's address in "to", subject "Reset your <App name> password", and both html and text bodies containing the link.
3. Show the same "If that email has an account, we've sent a link" message whether or not the account exists.
4. The reset page should ask for the new password and only use the token when the form is submitted, then delete it so it works once.
  • Make the link open a page with a button, and only use the token when that form is submitted. Some email security scanners open links before the user does, which would use up a token that's spent on page load.

WHAT YOU CAN SEND

Every email your app needs.

  • Welcome emails

    Greet every new sign-up from your own address.

  • OTPs and password resets

    Sign-in codes and reset links that arrive fast.

  • Orders and receipts

    Confirmations, invoices and shipping updates.

  • Replies that reach you

    Customer replies land in a shared team mailbox.

SIDE BY SIDE

Reset email mistakes, and what to do instead

TopicCommon mistakeDo this instead
SenderA shared or no-reply address on someone else's domainYour own domain, with SPF, DKIM and DMARC set up
Link lifetimeNever expiresExpires in 30 to 60 minutes and works once
Token storageThe token saved as-is in the databaseOnly a hash of the token is saved
Unknown emails"No account with that email"The same message whether or not the account exists
Subject line"URGENT: Action required!!!""Reset your Acme password"
BodyOne big imageShort text with a clear button, plus a plain-text version

TROUBLESHOOTING

If something doesn't work.

  • A user says the email never arrived

    Look the address up in your MailKaka logs. Delivered means it reached their mail server (ask them to check spam). Bounced means the address is wrong. Suppressed means an earlier email to it bounced or was reported as spam.

  • Reset emails go to spam

    Finish the SPF, DKIM and DMARC records shown in the dashboard, send from your own domain, keep links on the same domain you send from, and avoid link shorteners.

  • The link says it has expired when the user clicks it

    An email scanner probably opened it first. Use the token only when the user submits the new-password form, not when the page loads.

  • Supabase or Firebase reset emails don't arrive

    Their built-in email is limited and meant for testing. Send those emails through MailKaka instead; the Supabase guide shows how with the Send Email Hook.

BUILT FOR AI AGENTS

Let Claude Code, Cursor or any MCP client run your email.

MailKaka hosts an MCP server. Connect your coding agent once, and it can add your domain and show the DNS records, check verification, send a test email, read delivery status, and create the API key your app needs. You sign in from a browser and choose what it's allowed to do.

  • Per-agent limits: 60 sends a minute and 500 emails a day
  • Separate permissions for viewing, changing, sending and mailboxes
  • A preview before deletes, batch sends and new API keys
  • Every connection listed, and removable, in the dashboard
claude mcp add --transport http mailkaka https://www.mailkaka.in/api/mcp

FAQ

Common questions.

How long should a password reset link last?

Keep it short: 30 to 60 minutes is common. Make it work only once, and invalidate older links when a new one is requested.

Should the reset page say whether an account exists?

No. Show the same message either way, such as "If that email has an account, we've sent a link". Otherwise anyone can check which emails are registered.

Can I send password reset emails for free?

Yes. The free plan includes 3,000 emails a month from one verified domain, which covers reset emails for most early-stage apps.

How do I know if a reset email was delivered?

Every email appears in your MailKaka logs with its status. From code, call GET /emails/{id} with the id the send request returned.

Is MailKaka a good email API for Indian startups?

It's built for them. Email is sent from Mumbai, plans are priced and billed in INR through Razorpay (UPI and cards), and the free plan covers 3,000 emails a month. It accepts the same send request as Resend, so moving later is easy either way.

START WITH ONE DOMAIN

Send password reset emails people actually receive.

Free for 3,000 emails a month. Paid plans are billed in INR through Razorpay.

RELATED

Password Reset Emails That Land in the Inbox | MailKaka