Back to blog
Tutorial

How to Send Your First Email with PostaSend in Under 5 Minutes

ML
Marcus Lawrence
June 29, 2026

Getting started with PostaSend takes under five minutes if you follow this guide. There are three integration paths: the npm package for JavaScript and TypeScript projects, the REST API for any language, and the SMTP relay for codebases that already use a mailer library. All three paths use the same API key and route through the same infrastructure, choose whichever fits your stack best.

Path one: the npm package. Run npm install postasend in your project, then initialize the client with your API key from the dashboard. Call client.emails.send() with a from address from your verified domain, a to address, a subject, and an html body. The response gives you a messageId you can store for tracking. That is the entire integration for most use cases. The SDK is fully typed, so TypeScript users get IntelliSense on every field.

Path two: the REST API. If you are on Python, Go, Ruby, PHP, or any other language, send a POST request to https://api.postasend.com/v1/emails/send with your API key as a Bearer token in the Authorization header and a JSON body containing from, to, subject, and html. The response shape is identical to the SDK, messageId and status. You can use any HTTP client you already have in your project.

Path three: SMTP relay. If you are using Nodemailer, PHPMailer, Python's smtplib, or any other SMTP library, point it at smtp.postasend.com on port 587 with STARTTLS. Your SMTP username is your PostaSend API key; the password field accepts any non-empty string. This path requires zero code changes if you already have a mailer configured, just update the host and credentials. All three paths produce the same result: your email in the inbox, tracked in your PostaSend dashboard, with full delivery event history.

Written by
ML
Marcus Lawrence
More articles →