Scaleway
Send through Scaleway Transactional Email with region-scoped endpoints and header-based reply-to.
Capabilities
| Repeated headers | Idempotency | Scheduling | Personalized |
|---|---|---|---|
| Yes | none |
No | expanded |
These values come from the adapter’s exported capabilities declaration. The field support matrix covers normalized message fields.
The Scaleway adapter calls the Scaleway Transactional Email API with plain fetch. Sends are region-scoped: the adapter targets /regions/{region}/emails and defaults to fr-par.
Configure
Create an IAM secret key in the Scaleway console, note your project ID, and verify the sending domain in Transactional Email.
import { createEmailClient } from "@opencoredev/email-sdk";
import { scaleway } from "@opencoredev/email-sdk/scaleway";
export const email = createEmailClient({
adapters: [
scaleway({
secretKey: process.env.SCALEWAY_SECRET_KEY!,
projectId: process.env.SCALEWAY_PROJECT_ID!,
}),
],
});
secretKeystring
Scaleway IAM secret key, sent as the X-Auth-Token header.
stringprojectIdstring
Scaleway project ID the emails belong to.
stringregion?string
Transactional Email region used in the endpoint path.
string"fr-par"baseUrl?string
Override the API origin, e.g. for a proxy.
string"https://api.scaleway.com"fetch?typeof fetch
Custom fetch implementation for tests or special runtimes.
typeof fetchSend
Scaleway maps cc, bcc, replyTo, headers, and attachments.
const result = await email.send({
from: "Acme <billing@acme.com>",
to: "user@example.com",
replyTo: "support@acme.com",
subject: "Your May invoice",
html: "<p>Invoice INV-2041 is attached.</p>",
attachments: [
{ filename: "invoice.txt", content: "Invoice INV-2041: 49.00 EUR", contentType: "text/plain" },
],
});
console.log(result.id); // Scaleway email id (`id` or `email_id` in the response)
replyTo travels as a Reply-To entry in Scaleway’s additional_headers. Setting both replyTo and a manual Reply-To header throws an EmailValidationError before any request, so pick one.
Verify from the CLI
SCALEWAY_SECRET_KEY="..." SCALEWAY_PROJECT_ID="..." npx --package @opencoredev/email-sdk email-sdk doctor --adapter scaleway
SCALEWAY_SECRET_KEY="..." SCALEWAY_PROJECT_ID="..." npx --package @opencoredev/email-sdk email-sdk send \
--adapter scaleway \
--region fr-par \
--from "Acme <hello@acme.com>" \
--to user@example.com \
--subject "Scaleway smoke test" \
--text "It works" \
--dry-run
--region falls back to the SCALEWAY_REGION env var, then fr-par. Drop --dry-run for one real send to prove the key, project, region, and sender domain line up.