Plug-and-play. Send. Receive. Parse. Connect.

Since Postmark only allows Transactional email, every endpoint, hook, and API tool is designed specifically to support everything you need to do with transactional email in your web application.

Use either SMTP or our REST API with client libraries or API Explorer.

You can be up and running in no time at all using our SMTP integration and switch to a more robust API integration as time allows, or you can dive right in to a full API integration using the client library of your choice. Our setup process and API documentation make things as easy as possible, and our API Explorer lets you test drive any of our API calls against your account to quickly get an idea of what the requests and responses look like with real data.


# Send an email with curl
# Copy and paste this into terminal

curl "https://api.postmarkapp.com/email" \
  -X POST \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-Postmark-Server-Token: POSTMARK_API_TEST" \
  -d "{From: 'sender@example.com', To: 'receiver@example.com', Subject: 'Hello from Postmark', HtmlBody: '<strong>Hello</strong> dear Postmark user.'}"

# Send an email with the Postmark Ruby Gem
# Learn more -> https://postmarkapp.com/developer/integration/official-libraries#ruby-gem

# Install with Bundler
gem 'postmark'

# Create an instance of Postmark::ApiClient
client = Postmark::ApiClient.new('POSTMARK_API_TEST')

# Example request
client.deliver(
  from: 'sender@example.com',
  to: 'receiver@example.com',
  subject: 'Hello from Postmark',
  html_body: '<strong>Hello</strong> dear Postmark user.',
  track_opens: true
)

# Send an email with the Postmark Rails Gem
# Learn more -> https://postmarkapp.com/developer/integration/official-libraries#rails-gem

# Add this to your gemfile
gem 'postmark-rails'

# Add this to your config/application.rb file:
config.action_mailer.delivery_method = :postmark
config.action_mailer.postmark_settings = { :api_token => "POSTMARK_API_TEST" }

# Send the email
class TestMailer < ActionMailer::Base
  def message
    mail(
      :subject => 'Hello from Postmark',
      :to  => 'receiver@example.com',
      :from => 'sender@example.com',
      :html_body => '<strong>Hello</strong> dear Postmark user.',
      :track_opens => 'true'
    )
  end
end

// Send an email with the Postmark .NET library
// Learn more -> https://postmarkapp.com/developer/integration/official-libraries#dot-net

// Install with NuGet
PM> Install-Package Postmark

// Import
using PostmarkDotNet;

// Example request
PostmarkMessage message = new PostmarkMessage {
    From = "sender@example.com",
    To = "receiver@example.com",
    Subject = "Hello from Postmark",
    HtmlBody = "<strong>Hello</strong> dear Postmark user.",
    TextBody = "Hello dear postmark user.",
    ReplyTo = "reply@example.com",
    TrackOpens = true,
    Headers = new NameValueCollection {{ "CUSTOM-HEADER", "value" }}
          };

PostmarkClient client = new PostmarkClient("POSTMARK_API_TEST");

PostmarkResponse response = client.SendMessage(message);

if(response.Status != PostmarkStatus.Success) {
    Console.WriteLine("Response was: " + response.Message);
}

// Send an email with the Postmark-PHP library
// Learn more -> https://postmarkapp.com/developer/integration/official-libraries#php

// Install with composer
composer require wildbit/postmark-php

// Import
use Postmark\PostmarkClient;

// Example request
$client = new PostmarkClient("server token");

$sendResult = $client->sendEmail(
  "sender@example.com",
  "receiver@example.com",
  "Hello from Postmark!",
  "This is just a friendly 'hello' from your friends at Postmark."
);

// Send an email with the Postmark.js library
// Learn more -> https://postmarkapp.com/developer/integration/official-libraries#node-js

// Install with npm
npm install postmark --save

// Require
var postmark = require("postmark");

// Example request
var client = new postmark.Client("server token");

client.sendEmail({
    "From": "sender@example.com",
    "To": "receiver@example.com",
    "Subject": "Test",
    "TextBody": "Hello from Postmark!"
});

Use Postmark servers to group sending for different apps or environments.

Postmark uses the concept of servers to help you organize your transactional email into logical groups with different servers for each of your applications or environments. That way you can have focused reports, limited access API keys, and a simple way to share access with your team.

Screenshot of servers page in the Postmark app

We’re right on the edge of what people are doing with email, and the Postmark team has been incredibly responsive at helping us, or even building new functionality to meet our needs. This makes it really feel like Postmark is an extension of our team…

Instantly notify your application of any bounced or opened message.

You can virtually eliminate support requests about delivery issues and empower your customers to know automatically when they’ve made a mistake with an email address. Just as easily, your customers can know right away when an invite has been accepted by one of their end users.

Two servers with arrows between indicating bounce and open tracking
{
  "ID": 42,
  "Type": "HardBounce",
  "TypeCode": 1,
  "Name": "Hard bounce",
  "Tag": "Test",
  "MessageID": "883953f4-6105-42a2-a16a-77a8eac79483",
  "Description": "The server was unable to deliver your message (ex: unknown user, mailbox not found).",
  "Details": "Test bounce details",
  "Email": "john@example.com",
  "BouncedAt": "2014-08-01T13:28:10.2735393-04:00",
  "DumpAvailable": true,
  "Inactive": true,
  "CanActivate": true,
  "Subject": "Test subject"
}
Bounce webhook example
{
  "FirstOpen": true,
  "Client": {
    "Name": "Chrome 35.0.1916.153",
    "Company": "Google",
    "Family": "Chrome"
  },
  "OS": {
    "Name": "OS X 10.7 Lion",
    "Company": "Apple Computer, Inc.",
    "Family": "OS X 10"
  },
  "Platform": "WebMail",
  "UserAgent": "Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/35.0.1916.153 Safari\/537.36",
  "ReadSeconds": 5,
  "Geo": {
    "CountryISOCode": "RS",
    "Country": "Serbia",
    "RegionISOCode": "VO",
    "Region": "Autonomna Pokrajina Vojvodina",
    "City": "Novi Sad",
    "Zip": "21000",
    "Coords": "45.2517,19.8369",
    "IP": "188.2.95.4"
  },
  "MessageID": "883953f4-6105-42a2-a16a-77a8eac79483",
  "ReceivedAt": "2014-06-01T12:00:00",
  "Tag": "welcome-email",
  "Recipient": "john@example.com"
}
Open tracking webhook example

In general, Yapmo doesn’t outsource development needs — it’s our preference to build internally. Postmark is the only exception to this rule. The reason for this is simple: Postmark is reliable, cost effective, and gets the job done. They’re best at what they do, and it lets us spend our time on our core business.

Send on behalf of your customers without spoofing.

We know that adding DNS entries can be tedious and even a little confusing at time, so we make it incredibly easy to setup all of the necessary records to help protect your domain and your reputation so your emails have the best possible chance of making it to your users’ inboxes. Postmark even gives you API endpoints to integrate DKIM, SPF, and DMARC support for your customers’ domains.

Screenshot of the Sender Signatures page in the Postmark app

Incorporate status information into your dashboard with our Status API.

In addition to the API that you use to interact with your account, we also expose our status page information through an API so you always have the most current status information within your own application and dashboard.

{
    "status": "UP",
    "lastCheckDate": "2016-03-17T14:50:24+00:00"
}

Still have questions?

  • Dana Chaby Dana
  • Marek Loder Marek

Ask us anything! We’re eager to help you with any problem or question you have…