MillionSend Docs

SDKs

Official MillionSend SDKs for nine languages, published under MIT.

Every SDK mirrors the shape of the corresponding official Resend SDK, so migrating is mostly a find-and-replace: swap the import/class and point the base URL at MillionSend. All SDKs are MIT-licensed and live in their own repositories under the MillionSend GitHub org.

Since the API is Resend wire-compatible, the official Resend SDKs also work — point them at MillionSend via their base-URL option (e.g. RESEND_BASE_URL).

Base URL

api.millionsend.com — what every example on this page uses, and the default from SDK 0.5.0: with no base URL configured, an SDK talks to Cloud.

Node.js / TypeScript

millionsend on npm — Node 18+.

npm install millionsend
import { MillionSend } from "millionsend";

const ms = new MillionSend("ms_123", { baseUrl: "https://api.millionsend.com" });

const { data, error } = await ms.emails.send({
  from: "Acme <[email protected]>",
  to: "[email protected]",
  subject: "Hello from MillionSend",
  html: "<strong>It works!</strong>",
});

Python

millionsend on PyPI — Python 3.9+.

pip install millionsend
import millionsend

millionsend.api_key = "ms_123"
millionsend.base_url = "https://api.millionsend.com"

email = millionsend.Emails.send({
    "from": "Acme <[email protected]>",
    "to": "[email protected]",
    "subject": "Hello from MillionSend",
    "html": "<strong>It works!</strong>",
})

Go

millionsend-go — Go 1.21+.

go get github.com/MillionSend/millionsend-go
client := millionsend.NewClient("ms_123")
client.BaseURL = "https://api.millionsend.com"

sent, err := client.Emails.Send(&millionsend.SendEmailRequest{
    From:    "Acme <[email protected]>",
    To:      []string{"[email protected]"},
    Subject: "Hello from MillionSend",
    Html:    "<strong>It works!</strong>",
})

Ruby

millionsend on RubyGems — Ruby 3.0+.

gem install millionsend
require "millionsend"

Millionsend.api_key  = "ms_123"
Millionsend.base_url = "https://api.millionsend.com"

email = Millionsend::Emails.send(
  from: "Acme <[email protected]>",
  to: "[email protected]",
  subject: "Hello from MillionSend",
  html: "<strong>It works!</strong>"
)

PHP

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

composer require millionsend/millionsend-php
use MillionSend\MillionSend;

$ms = MillionSend::client('ms_123', 'https://api.millionsend.com');

$email = $ms->emails->send([
    'from' => 'Acme <[email protected]>',
    'to' => '[email protected]',
    'subject' => 'Hello from MillionSend',
    'html' => '<strong>It works!</strong>',
]);

Rust

millionsend on crates.io — async (tokio + reqwest).

[dependencies]
millionsend = "0.2"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
use millionsend::{MillionSend, SendEmailOptions};

let ms = MillionSend::with_base_url("ms_123", "https://api.millionsend.com");

let sent = ms.emails.send(&SendEmailOptions {
    from: "Acme <[email protected]>".into(),
    to: "[email protected]".into(),
    subject: "Hello from MillionSend".into(),
    html: Some("<strong>It works!</strong>".into()),
    ..Default::default()
}).await?;

Java

com.millionsend:millionsend-java on Maven Central — Java 11+.

<dependency>
  <groupId>com.millionsend</groupId>
  <artifactId>millionsend-java</artifactId>
  <version>0.2.0</version>
</dependency>
MillionSend ms = new MillionSend("ms_123", "https://api.millionsend.com");

CreateEmailResponse sent = ms.emails().send(
    CreateEmailOptions.builder()
        .from("Acme <[email protected]>")
        .to("[email protected]")
        .subject("Hello from MillionSend")
        .html("<strong>It works!</strong>")
        .build());

.NET

MillionSend on NuGet — targets net8.0.

dotnet add package MillionSend
using MillionSend;

var client = new MillionSendClient("ms_123", "https://api.millionsend.com");

var res = await client.EmailSendAsync(new EmailMessage
{
    From = "Acme <[email protected]>",
    To = "[email protected]",
    Subject = "Hello from MillionSend",
    Html = "<strong>It works!</strong>",
});

Elixir

millionsend on Hex — Elixir 1.15+.

# mix.exs
def deps do
  [{:millionsend, "~> 0.2"}]
end
config :millionsend, MillionSend.Client,
  api_key: System.get_env("MILLIONSEND_API_KEY"),
  base_url: "https://api.millionsend.com"

{:ok, email} =
  MillionSend.Emails.send(%{
    from: "Acme <[email protected]>",
    to: "[email protected]",
    subject: "Hello from MillionSend",
    html: "<strong>It works!</strong>"
  })

On this page