Postmark

Transactional Email Service

10 min read

Postmark SMTP Settings

Complete guide to configure Postmark SMTP for sending transactional emails. Postmark is known for exceptional deliverability and fast delivery times.

Postmark Postmark SMTP Quick Reference

SMTP Server smtp.postmarkapp.com
Port (TLS) 587 Recommended
Alternative Ports 2525, 25
Encryption STARTTLS (Required)
Username Your Server API Token
Password Your Server API Token (same as username)
Authentication Server API Token
info

Postmark is for Transactional Email Only

Postmark is specifically designed for transactional emails (receipts, notifications, password resets). Marketing and promotional emails are NOT allowed. If you need to send marketing emails, use a different provider like SendGrid or Mailgun.

checklist Prerequisites

  • check_circle A Postmark account
  • check_circle A verified Sender Signature (email or domain)
  • check_circle Server API Token from your Postmark server

integration_instructions Step-by-Step Setup

1

Create a Postmark Server

  1. 1. Go to your Postmark dashboard
  2. 2. Click 'Servers' in the navigation
  3. 3. Click 'Create Server' and give it a name
  4. 4. Choose the server color for easy identification
2

Add a Sender Signature

  1. 1. Go to 'Sender Signatures' in your account
  2. 2. Click 'Add Domain' for domain verification (recommended)
  3. 3. Add the DKIM and Return-Path DNS records
  4. 4. Wait for verification (usually instant)

Tip: Domain verification provides better deliverability than single email verification.

3

Get Your Server API Token

  1. 1. Go to your Server โ†’ 'API Tokens' tab
  2. 2. Copy the 'Server API Token'
  3. 3. Use this token as both username AND password for SMTP

Important: The Server API Token is used for both the SMTP username and password fields. They should be identical.

code Code Examples

import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart

# Postmark SMTP settings
SMTP_SERVER = "smtp.postmarkapp.com"
SMTP_PORT = 587
SERVER_TOKEN = "your-server-api-token"

# Create message
msg = MIMEMultipart()
msg['From'] = "sender@yourdomain.com"
msg['To'] = "recipient@example.com"
msg['Subject'] = "Test from Postmark SMTP"

body = "This is a test email sent via Postmark SMTP."
msg.attach(MIMEText(body, 'plain'))

# Send email
with smtplib.SMTP(SMTP_SERVER, SMTP_PORT) as server:
    server.starttls()
    server.login(SERVER_TOKEN, SERVER_TOKEN)  # Same token for both
    server.send_message(msg)
    print("Email sent successfully!")
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;

require 'vendor/autoload.php';

$mail = new PHPMailer(true);

// Postmark SMTP settings
$mail->isSMTP();
$mail->Host = 'smtp.postmarkapp.com';
$mail->SMTPAuth = true;
$mail->Username = 'your-server-api-token';
$mail->Password = 'your-server-api-token';  // Same token
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
$mail->Port = 587;

// Email content
$mail->setFrom('sender@yourdomain.com', 'Your Name');
$mail->addAddress('recipient@example.com');
$mail->Subject = 'Test from Postmark SMTP';
$mail->Body = 'This is a test email via Postmark.';

$mail->send();
echo "Email sent successfully!";
const nodemailer = require('nodemailer');

const transporter = nodemailer.createTransport({
    host: 'smtp.postmarkapp.com',
    port: 587,
    secure: false, // STARTTLS
    auth: {
        user: 'your-server-api-token',
        pass: 'your-server-api-token'  // Same token
    }
});

const mailOptions = {
    from: 'sender@yourdomain.com',
    to: 'recipient@example.com',
    subject: 'Test from Postmark SMTP',
    text: 'This is a test email via Postmark.'
};

transporter.sendMail(mailOptions, (error, info) => {
    if (error) console.error('Error:', error);
    else console.log('Email sent:', info.messageId);
});
require 'mail'

Mail.defaults do
  delivery_method :smtp, {
    address: 'smtp.postmarkapp.com',
    port: 587,
    user_name: 'your-server-api-token',
    password: 'your-server-api-token',  # Same token
    authentication: :plain,
    enable_starttls_auto: true
  }
end

mail = Mail.new do
  from    'sender@yourdomain.com'
  to      'recipient@example.com'
  subject 'Test from Postmark SMTP'
  body    'This is a test email via Postmark.'
end

mail.deliver!
puts "Email sent successfully!"

speed Sending Limits

Plan Emails/Month Price
Free Trial 100 Free
10,000 10,000 $15/mo
50,000 50,000 $50/mo
125,000 125,000 $100/mo

No rate limits on sending speed. Postmark is optimized for fast delivery.

build Troubleshooting

error

Authentication Failed

Invalid Server API Token

Fix: Ensure you're using the Server API Token (not Account API Token). Check that the token is copied correctly and used for both username and password.

error

Sender Signature Not Found

From address not verified

Fix: Add and verify a Sender Signature for the email address or domain you're sending from.

error

Connection Refused

Cannot connect on port 587

Fix: Try port 2525 or 25 as alternatives. Some networks block port 587.

help Frequently Asked Questions

Can I use Postmark for marketing emails? expand_more
No. Postmark is strictly for transactional emails only. Marketing, promotional, and bulk emails are not allowed and will result in account suspension. Use SendGrid, Mailgun, or other services for marketing emails.
What's the difference between Server and Account API tokens? expand_more
Server API Token is used for sending emails from a specific server. Account API Token is for managing your Postmark account (creating servers, managing signatures). For SMTP, always use the Server API Token.
Why is the username and password the same? expand_more
Postmark uses the Server API Token for authentication. For SMTP compatibility, you enter the same token in both the username and password fields. This is by design.

Need Marketing Email Support?

Postmark is transactional-only. For marketing campaigns, check out these alternatives with full marketing support.