MailKaka

INTEGRATIONS · AUTH LIBRARIES

Send emails with Auth.js (NextAuth)

Auth.js's email sign-in can send its magic link through any HTTP API. Give it a sendVerificationRequest that calls MailKaka.

  • 3,000 emails a month free
  • Billed in INR
  • Sent from Mumbai
auth.ts
import NextAuth from "next-auth";

export const { handlers, auth, signIn, signOut } = NextAuth({
  // adapter: ... (required for email sign-in)
  providers: [
    {
      id: "mailkaka",
      type: "email",
      name: "Email",
      from: "Acme <auth@yourdomain.com>",
      maxAge: 60 * 60,
      async sendVerificationRequest({ identifier: to, url, provider }) {
        const res = await fetch("https://www.mailkaka.in/api/emails", {
          method: "POST",
          headers: {
            Authorization: "Bearer " + process.env.MAILKAKA_API_KEY,
…
200 OK · email queued

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

    Plug it into your auth flow

    Verification, reset and sign-in emails come from your domain.

CODE

Configure the email provider

Auth.js needs a database adapter for email sign-in. This uses its generic HTTP email provider shape.

  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.
auth.ts
import NextAuth from "next-auth";

export const { handlers, auth, signIn, signOut } = NextAuth({
  // adapter: ... (required for email sign-in)
  providers: [
    {
      id: "mailkaka",
      type: "email",
      name: "Email",
      from: "Acme <auth@yourdomain.com>",
      maxAge: 60 * 60,
      async sendVerificationRequest({ identifier: to, url, provider }) {
        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: provider.from,
            to: [to],
            subject: "Your sign-in link",
            html: '<p><a href="' + url + '">Sign in</a></p>',
          }),
        });
        if (!res.ok) throw new Error(await res.text());
      },
    },
  ],
});

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.

ALREADY ON RESEND?

Switch with one line.

MailKaka accepts the same send request as Resend. Keep the Resend Node SDK, swap the key and set the base URL. Single and batch sends work the same way; open and click tracking aren't supported.

MailKaka vs Resend
Resend SDK
new Resend(process.env.MAILKAKA_API_KEY, {
  baseURL: "https://www.mailkaka.in/api",
})

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.

Does MailKaka have an SDK for this language?

You don't need one: sending is a single HTTPS POST with a JSON body, as shown above. If your code already uses Resend's Node SDK, you can keep it and point it at MailKaka instead.

Can I use SMTP instead?

SMTP is not switched on by default, so the HTTP API is the way to send. It is also faster to set up, and every send shows up in your dashboard's logs.

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 your first email from Auth.js (NextAuth) today.

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

RELATED

Auth.js / NextAuth Magic Link Emails without SMTP | MailKaka