This guide takes you from zero to a delivered email. No configuration files. No infrastructure. Just an API key and a few lines of code.
By the end, you'll have sent a real email through euromail's SMTP engine with DKIM signing, SPF alignment, and bounce tracking, all running from Finnish infrastructure.
What you'll need
- An email address for registration
- A domain you control (for DNS verification)
- A terminal with
curl, or a project using TypeScript or Rust
Step 1: Create your account
Go to dashboard.euromail.dev/register and sign up with your email, a password, and your company or project name.
You'll receive a verification email. Click the link to activate your account.
The free plan gives you 1,000 emails per month, one domain, five templates, and two webhooks. No credit card required.
Step 2: Get your API key
After verifying your email, the dashboard shows your onboarding page with a freshly generated API key. It looks like this:
em_live_aBcDeFgHiJkLmNoPqRsTuVwXyZ012345
Copy it now. The full key is only shown once. You can always create new keys from the dashboard under API Keys.
You'll pass this key in the X-EuroMail-Api-Key header on every request.
Step 3: Register your sending domain
Before sending email, you need to tell euromail which domain you're sending from. If your emails come from [email protected], register yourdomain.com.
Via the dashboard
The onboarding wizard has a domain field. Type your domain name and click "Add domain."
Via the API
curl -X POST https://api.euromail.dev/v1/domains \
-H "X-EuroMail-Api-Key: em_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"domain": "yourdomain.com"}'
The response includes DNS records you'll need to configure:
{
"data": {
"id": "d4e5f6...",
"domain": "yourdomain.com",
"dns_records": {
"dkim": {
"type": "TXT",
"host": "euromail._domainkey.em.yourdomain.com",
"value": "v=DKIM1; k=rsa; p=MIIBIjANBg..."
},
"spf": {
"type": "TXT",
"host": "em.yourdomain.com",
"value": "v=spf1 include:spf.euromail.dev ~all"
},
"return_path": {
"type": "MX",
"host": "em.yourdomain.com",
"value": "bounce.euromail.dev",
"priority": 10
}
}
}
}
Notice that all records live under the em. subdomain. This isolates your transactional email reputation from your root domain, so a delivery issue with marketing email won't affect your password reset deliverability (or vice versa).
Step 4: Send your first email (sandbox mode)
Here's the trick: you don't have to wait for DNS verification to test the API. Euromail has sandbox mode. When your domain isn't verified yet, you can send emails to your own account email address. The email goes through the full pipeline (queue, DKIM signing, SMTP delivery) but is restricted to your address only.
Using cURL
curl -X POST https://api.euromail.dev/v1/emails \
-H "X-EuroMail-Api-Key: em_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"from": "[email protected]",
"to": "[email protected]",
"subject": "My first euromail",
"html_body": "<h1>It works!</h1><p>Sent from Finland.</p>"
}'
If everything is correct, you'll get a 202 Accepted response:
{
"data": {
"id": "a1b2c3d4-...",
"message_id": "<[email protected]>",
"status": "queued",
"to": "[email protected]",
"sandbox": true,
"created_at": "2026-04-04T12:00:00Z"
}
}
The "sandbox": true flag tells you the domain isn't verified yet. The email still delivers to your address. Check your inbox.
Using TypeScript
Install the SDK:
npm install @euromail/sdk
Send an email:
import { EuroMail } from "@euromail/sdk";
const euromail = new EuroMail({
apiKey: "em_live_your_key_here",
});
const result = await euromail.sendEmail({
from: "[email protected]",
to: "[email protected]",
subject: "My first euromail",
html_body: "<h1>It works!</h1><p>Sent from Finland.</p>",
});
console.log(`Email queued: ${result.id}`);
console.log(`Sandbox: ${result.sandbox}`);Using Rust
Add the dependency:
cargo add euromail
Send an email:
use euromail::{EuroMail, SendEmailParams};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = EuroMail::new("em_live_your_key_here");
let response = client.send_email(&SendEmailParams {
from: "[email protected]".into(),
to: "[email protected]".into(),
subject: Some("My first euromail".into()),
html_body: Some("<h1>It works!</h1><p>Sent from Finland.</p>".into()),
..Default::default()
}).await?;
println!("Email queued: {}", response.id);
Ok(())
}Step 5: Verify your domain
Sandbox mode is useful for testing, but to send to real recipients you need to configure DNS. Add the three records from Step 3 to your DNS provider:
| Record | Type | Host | Value |
|---|---|---|---|
| DKIM | TXT | euromail._domainkey.em.yourdomain.com | v=DKIM1; k=rsa; p=... (from dashboard) |
| SPF | TXT | em.yourdomain.com | v=spf1 include:spf.euromail.dev ~all |
| Return path | MX | em.yourdomain.com | bounce.euromail.dev (priority 10) |
After adding the records, verify them:
curl -X POST https://api.euromail.dev/v1/domains/YOUR_DOMAIN_ID/verify \
-H "X-EuroMail-Api-Key: em_live_your_key_here"
DNS propagation typically takes 5 to 30 minutes. If verification fails, wait a few minutes and try again. The dashboard shows real-time status for each record.
Once verified, the sandbox flag disappears and you can send to any recipient.
What happens when you send
When your email hits POST /v1/emails, here's the pipeline it goes through:
- Validation ... the API checks the sender domain, recipient addresses, body size, and your plan quota
- Queue ... the email is added to a Redis stream and returns
202 Acceptedimmediately - DKIM signing ... the worker signs the message with your domain's RSA-2048 key
- SMTP delivery ... direct connection to the recipient's MX server, with STARTTLS and optional DANE verification
- Bounce handling ... if the recipient's server rejects the email, the bounce is parsed and classified (hard/soft)
- Webhook notification ... if you've configured webhooks, you'll get a callback for each delivery event
The entire pipeline runs in Finland. No data leaves the EU.
Next steps
Add a webhook
Get notified when emails are delivered, bounced, or marked as spam:
curl -X POST https://api.euromail.dev/v1/webhooks \
-H "X-EuroMail-Api-Key: em_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"url": "https://yourdomain.com/webhooks/euromail",
"events": ["delivered", "bounced", "complained"]
}'
The response includes a secret for HMAC-SHA256 signature verification. Store it securely.
Use templates
Instead of sending raw HTML every time, create a reusable template:
curl -X POST https://api.euromail.dev/v1/templates \
-H "X-EuroMail-Api-Key: em_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"alias": "welcome",
"name": "Welcome Email",
"subject": "Welcome, {{ name }}!",
"html_body": "<h1>Hello {{ name }}</h1><p>Your account is ready.</p>"
}'
Then send with the template and variables:
curl -X POST https://api.euromail.dev/v1/emails \
-H "X-EuroMail-Api-Key: em_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"from": "[email protected]",
"to": "[email protected]",
"template_alias": "welcome",
"template_data": {"name": "Alice"}
}'
Templates use MiniJinja syntax: {{ variable }} for interpolation, {% if condition %} for conditionals, {% for item in list %} for loops.
Check delivery status
Poll the status of a sent email:
curl https://api.euromail.dev/v1/emails/YOUR_EMAIL_ID \
-H "X-EuroMail-Api-Key: em_live_your_key_here"
The status field progresses through: queued -> processing -> sent -> delivered (or bounced / failed).
Explore the API
The full API reference with an interactive Swagger UI is at api.euromail.dev/docs. Every endpoint is documented with request/response examples.
Common issues
"Domain not verified" error when sending to other people
Your DNS records aren't fully propagated yet. Both DKIM and return path must be verified. Check status in the dashboard or call POST /v1/domains/{id}/verify.
"Authentication required" (401)
Make sure you're passing the API key in the X-EuroMail-Api-Key header (not Authorization without the right prefix). The key must start with em_live_.
"Monthly quota exceeded" (429)
The free plan allows 1,000 emails per month. Upgrade to Starter ($25/mo) for 25,000 emails at dashboard.euromail.dev.
Email lands in spam
This usually means DNS isn't fully configured. Verify that SPF, DKIM, and return path all show "Verified" in the dashboard. Also check your sending domain's reputation with Google Postmaster Tools.