MepMail Docs

SDKs

Use the official Resend SDKs against your MepMail instance — there is no client of ours to install.

MepMail speaks the Resend wire protocol, so there is no SDK of ours to install. Use the official Resend SDKs with your instance's API origin. Compatibility depends on the SDK version and operation; the matrix below separates automated contract coverage from configuration examples.

Two things MepMail does publish on npm are not SDKs — the local MCP server and the migration CLI. They are in npm packages.

Compatibility matrix

SDKRuntimeAutomated repository coverage
resend@6.27.0 (Node / TypeScript)Node >=20Contract suites: emails, domains, contacts, contact properties, segments, broadcasts, suppressions, templates, topics, webhooks.

The Node contract suites use a local API and synthetic database fixtures with delivery enqueueing stubbed: they check request/response compatibility, not external delivery. The version is generated from the repository lockfile. Python, Go, Ruby, PHP, Rust, Elixir, .NET and Java examples below have no pinned version in this automated matrix; validate the operations your application uses before adopting a different SDK version.

As checked on 16 October 2026, npm's resend@6.33.0 metadata declares Node 20 or newer. That release is not covered by the pinned gate above.

What the official SDKs can reach

Reaches MepMailNot implemented
emails domains contacts audiences broadcasts contactProperties segments suppressions templates topics webhooksautomations events logs oauthGrants

The right-hand column answers 404. If a call you depend on is there, tell us — the wire format is compatible, so the endpoint is usually a day's work rather than a redesign.

Base URL

https://api.mepmail.dev — what every example on this page uses.

Create your account at mepmail.dev/signup. The Send Free plan requires no card and sends up to 100 emails per UTC day. Paid plans and the Mail trial have separate terms on Pricing.

In the dashboard, you can request a test email to your own address without adding a domain or creating an API key. To integrate your product or agent, verify your sending domain in Domains, create an API key in API keys, and use the API origin above with the SDK.

Trailing slash

The base URL is joined with the request path by each SDK, and they disagree about whether the path already starts with a slash. Getting it wrong is a 404 on every call, so it is worth copying exactly:

Base URLSDKs
No trailing slashNode, Python, Rust, Elixir
Trailing slash requiredGo, Ruby
Either worksPHP, .NET

Node.js / TypeScript

resend on npm — Node 20+.

npm install resend
import { Resend } from "resend";

const resend = new Resend("ms_123", {
  baseUrl: "https://api.mepmail.dev",
});

const { data, error } = await resend.emails.send({
  from: "Acme <onboarding@acme.dev>",
  to: "delivered@example.com",
  subject: "Hello from MepMail",
  html: "<strong>It works!</strong>",
});

Python

resend on PyPI — Python 3.9+.

pip install resend
import resend

resend.api_key = "ms_123"
resend.api_url = "https://api.mepmail.dev"  # no trailing slash

email = resend.Emails.send({
    "from": "Acme <onboarding@acme.dev>",
    "to": "delivered@example.com",
    "subject": "Hello from MepMail",
    "html": "<strong>It works!</strong>",
})

PHP

resend/resend-php on Packagist — PHP 8.1+.

The base URL is not a constructor argument in PHP: the SDK reads it from the RESEND_BASE_URL environment variable when the client is created.

composer require resend/resend-php
putenv("RESEND_BASE_URL=https://api.mepmail.dev");

$resend = Resend::client('ms_123');

$email = $resend->emails->send([
    'from' => 'Acme <onboarding@acme.dev>',
    'to' => 'delivered@example.com',
    'subject' => 'Hello from MepMail',
    'html' => '<strong>It works!</strong>',
]);

Ruby

resend on RubyGems — Ruby 3.0+.

Ruby also reads only the environment variable — and it reads it once, when the library is loaded, so it has to be set before require "resend". Note the trailing slash.

gem install resend
ENV["RESEND_BASE_URL"] = "https://api.mepmail.dev/"

require "resend"
Resend.api_key = "ms_123"

email = Resend::Emails.send({
  "from" => "Acme <onboarding@acme.dev>",
  "to" => "delivered@example.com",
  "subject" => "Hello from MepMail",
  "html" => "<strong>It works!</strong>"
})

Go

github.com/resend/resend-go/v4 — Go 1.21+.

Use the /v4 module path. The older github.com/resend/resend-go without the suffix is a 2023 tag that no longer compiles.

go get github.com/resend/resend-go/v4
import (
    "net/url"

    "github.com/resend/resend-go/v4"
)

client := resend.NewClient("ms_123")
client.BaseURL, _ = url.Parse("https://api.mepmail.dev/")

sent, err := client.Emails.Send(&resend.SendEmailRequest{
    From:    "Acme <onboarding@acme.dev>",
    To:      []string{"delivered@example.com"},
    Subject: "Hello from MepMail",
    Html:    "<strong>It works!</strong>",
})

Rust

resend-rs on crates.io — async (tokio + reqwest).

[dependencies]
resend-rs = "0.32"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
use resend_rs::types::CreateEmailBaseOptions;
use resend_rs::{Config, Resend};

let resend = Resend::with_config(
    Config::builder("ms_123")
        .base_url("https://api.mepmail.dev".parse()?)
        .build(),
);

let sent = resend
    .emails
    .send(
        CreateEmailBaseOptions::new(
            "Acme <onboarding@acme.dev>",
            ["delivered@example.com"],
            "Hello from MepMail",
        )
        .with_html("<strong>It works!</strong>"),
    )
    .await?;

Java

The official Java SDK pins https://api.resend.com in a constant and exposes no way to change it, so there is no Java snippet to point at us — talk HTTP directly instead:

var body = """
    {
      "from": "Acme <onboarding@acme.dev>",
      "to": ["delivered@example.com"],
      "subject": "Hello from MepMail",
      "html": "<strong>It works!</strong>"
    }
    """;

var request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.mepmail.dev/emails"))
    .header("Authorization", "Bearer ms_123")
    .header("Content-Type", "application/json")
    .POST(HttpRequest.BodyPublishers.ofString(body))
    .build();

var response = HttpClient.newHttpClient()
    .send(request, HttpResponse.BodyHandlers.ofString());

.NET

Resend on NuGet — targets net8.0.

dotnet add package Resend
using Resend;

var options = new ResendClientOptions
{
    ApiToken = "ms_123",
    ApiUrl = "https://api.mepmail.dev",
};

var resend = ResendClient.Create(options);

await resend.EmailSendAsync(new EmailMessage
{
    From = "Acme <onboarding@acme.dev>",
    To = { "delivered@example.com" },
    Subject = "Hello from MepMail",
    HtmlBody = "<strong>It works!</strong>",
});

Elixir

resend on Hex — Elixir 1.15+. This one is community-maintained, not published by Resend, so treat its release cadence accordingly.

# mix.exs
def deps do
  [{:resend, "~> 1.0-rc"}]
end
client = Resend.client(
  api_key: "ms_123",
  base_url: "https://api.mepmail.dev"
)

{:ok, email} =
  Resend.Emails.send(client, %{
    from: "Acme <onboarding@acme.dev>",
    to: "delivered@example.com",
    subject: "Hello from MepMail",
    html: "<strong>It works!</strong>"
  })

The SMTP relay

Prefer SMTP? MepMail also runs a submission relay (STARTTLS, port 2587) for legacy clients and libraries that cannot change their base URL — Java above being one of them. Credentials are an API key, and the sending domain rules are the same as the API's. See Self-hosting → SMTP relay.

On this page