Sending
Send over SMTP
Point any SMTP client at Deckle to send email through your verified domain — no SDK or HTTP integration required.
If your framework or platform already speaks SMTP, you can send through Deckle without touching the API. Use your secret API key as the SMTP password and every message routes through your verified domain on AWS SES, just like an API send.
Credentials#
Connect your client with the settings below. The username is always the literal string apikey — the value that matters is the password, which is one of your secret API keys.
| Setting | Value |
|---|---|
| Host | smtp.getdeckle.com |
| Port | 587 (STARTTLS) or 465 (TLS) |
| Username | apikey |
| Password | Your secret API key (sk_live_… or sk_test_…) |
Which port?
Prefer587 with STARTTLS. Use 465 (implicit TLS) if your client or network blocks 587. Both are encrypted.Create a key in the dashboard under Developers → API keys. The same secret key doubles as your SMTP password, so a key with the right environment is all you need. See API keys for how keys map to Test and Live.
Send with Nodemailer#
Here’s a complete example using Nodemailer in Node.js. Store your key in an environment variable rather than hard-coding it.
import nodemailer from "nodemailer";
const transporter = nodemailer.createTransport({
host: "smtp.getdeckle.com",
port: 587,
secure: false, // true for port 465
auth: {
user: "apikey",
pass: process.env.DECKLE_API_KEY!,
},
});
await transporter.sendMail({
from: "Acme <hello@acme.com>",
to: "jane@example.com",
subject: "Welcome to Acme 👋",
html: "<h1>Hey Jane</h1><p>Thanks for joining.</p>",
text: "Hey Jane — thanks for joining.",
});Match the port to the transport
Setsecure: false for port 587 (STARTTLS) and secure: true for port 465 (implicit TLS). Mismatching them is the most common connection failure.Other frameworks#
Any tool that can send over SMTP works with Deckle — point it at the credentials above and send. A few common setups:
WordPress#
Install an SMTP plugin (for example WP Mail SMTP), then set the host to smtp.getdeckle.com, port 587 with encryption/STARTTLS, username apikey, and paste your secret key as the password. Set the “From” address to an address on your verified domain.
Laravel#
Configure the SMTP mailer in your .env:
MAIL_MAILER=smtp
MAIL_HOST=smtp.getdeckle.com
MAIL_PORT=587
MAIL_USERNAME=apikey
MAIL_PASSWORD=sk_live_...
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=hello@acme.com
MAIL_FROM_NAME="Acme"Any other SMTP client#
Django, Rails Action Mailer, Postfix, a printer, a CI job — whatever sends mail, give it the host smtp.getdeckle.com, port 587 or 465, username apikey, and your secret API key as the password. There’s nothing Deckle-specific beyond these settings.
Requirements#
- Your from-domain must be verified. The address in the
Fromheader has to belong to a domain you’ve added and verified in Domains. Sends from an unverified domain are rejected. - A live key sends to real inboxes. Use an
sk_live_…key for production traffic. A test key (sk_test_…) is sandboxed — it can only reach the AWS SES simulator mailboxes or your own verified domains, never arbitrary recipients.
Keep your key secret
Your SMTP password is a full-access API key. Load it from an environment variable or secret store, never commit it, and rotate it by creating a new key and revoking the old one.