Pick what you are building on and how you want to send. You get the commands to run and the configuration to paste — nothing generic, and nothing you have to translate from another framework's docs. Signing up takes one field: an email address, and the code we send to it.
Pick your stack
⌕
Languages and frameworks
CMS and e-commerce
Anything else
Pick how it sends
Create your account
Start sending
An email address is all Postwing needs. We'll send you a six-digit code.
Use an address you can read right now.
Add your sending domain
Tell Postwing which domain you'll send from. You'll get a handful of DNS records to publish — DKIM, SPF and DMARC — and sending unlocks as soon as they resolve.
Lowercase, no protocol, no trailing slash.
Create a credential
On the domain's Tokens page, create one. The login and password it gives you are the same pair for SMTP and for the REST API.
⚠
The password is shown once, when the token is created. If you lose it, create a new token — it isn't stored in a recoverable form.
Install the dependency
bash
pip install postwing
Configure
Credentials come from the environment rather than from the file itself, so they never reach your repository.
The From address has to be on the domain you added — that's what DKIM signs and what SPF and DMARC align against.
send.py
import os
from postwing importPostwingSdk
sdk =PostwingSdk(
os.environ["MAIL_TOKEN_USERNAME"],
os.environ["MAIL_TOKEN_PASSWORD"],)
sdk.send_simple(
recipient="customer@example.com",
sender="Acme <noreply@your-domain.com>",
subject="Your order #4417 is confirmed",
body="<p>Thanks! Your order ships tomorrow.</p>",)