Начать
Postmark

Transactional Email Service

10 мин чтения

Настройки Postmark SMTP

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

Postmark Postmark SMTP — Краткая справка

SMTP сервер smtp.postmarkapp.com
Порт (TLS) 587 Рекомендуется
Альтернативные порты 2525, 25
Описание Не рекомендуется
Имя пользователя Ваш API ключ SendGrid
Пароль Your Server API Token (same as username)
Автоопределение Токен API сервера
info

Postmark только для транзакционной почты

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 Предварительные требования

  • check_circle Персонализация
  • check_circle Верифицированная личность отправителя (email или домен)
  • check_circle Токен API сервера из вашего сервера Postmark

integration_instructions Пошаговая настройка

1

Создание сервера Postmark

  1. 1. Перейти в кабинет
  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. Как определить тип аккаунта:
  2. 2. Аутентификация домена (рекомендуется)
  3. 3. Add the DKIM and Return-Path DNS records
  4. 4. Дождитесь верификации (обычно 24-72 часа для доменов)

Совет: Domain verification provides better deliverability than single email verification.

3

Ваш API ключ SendGrid

  1. 1. Go to your Server → 'API Tokens' tab
  2. 2. Copy the 'Server API Token'
  3. 3. Почему нельзя использовать пароль Apple ID для SMTP?

Важно: The Server API Token is used for both the SMTP username and password fields. They should be identical.

code Примеры кода

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 Лимиты отправки

Тариф Писем отправлено Цена
Начать бесплатно - 500 писем 100 Бесплатно
10,000 10,000 $15/мес
50,000 50,000 $50/мес
125,000 125,000 $100/мес

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

build Решение проблем

error

Ошибка аутентификации

Invalid Server API Token

Исправление: 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

Адрес 'От' не верифицирован (Single Sender)

Исправление: Add and verify a Sender Signature for the email address or domain you're sending from.

error

Таймаут / Отказ соединения

Не удаётся подключиться к SES на порту 25

Исправление: Try port 2525 or 25 as alternatives. Some networks block port 587.

help Часто задаваемые вопросы

Можно ли использовать Outlook.com для массовых рассылок? 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.
В чём разница между регионами США и ЕС в Mailgun? 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.
Логин и пароль не приняты 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.