Documentation Index
Fetch the complete documentation index at: https://mintlify.com/revokslab/shipfree/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Postmark is a reliable email delivery service focused on transactional emails with industry-leading deliverability. It’s a great choice for ShipFree if you need:- Exceptional deliverability rates (99%+)
- Detailed delivery analytics
- Professional support
- DMARC monitoring and reports
- Message retention and search
- Native batch email support
Postmark is the second provider ShipFree checks during auto-discovery. If Resend isn’t configured, Postmark will be used automatically.
Prerequisites
- A Postmark account
- A verified sender signature or domain
Setup Instructions
Step 1: Create a Postmark Account
- Sign up at postmarkapp.com
- Complete the email verification
- Create your first server (e.g., “ShipFree Production”)
Step 2: Get Your API Token
- Navigate to Servers in the sidebar
- Select your server
- Go to the API Tokens tab
- Copy the Server API token
Step 3: Set Up a Sender Signature
- Single Email (Quick Start)
- Domain (Production)
For quick testing, verify a single email address:
- Go to Sender Signatures in your server
- Click Add Sender Signature
- Enter your email address (e.g.,
noreply@yourdomain.com) - Click Send Verification Email
- Check your inbox and click the verification link
Single sender signatures are perfect for development but limited to one address. For production, use domain verification.
Step 4: Configure Environment Variables
Add these to your.env file:
Step 5: Install Postmark Package
The Postmark package is already included in ShipFree:Step 6: Test Your Configuration
Features
Batch Email Support
Postmark supports native batch sending up to 500 emails per request:Email Attachments
Send files with your emails:Postmark supports attachments up to 10MB per email. Total email size (including attachments) cannot exceed 10MB.
Reply-To Headers
Custom Headers
ShipFree automatically handles list-unsubscribe headers for marketing emails:Plain Text Alternative
Postmark automatically generates plain text from HTML, but you can provide your own:Environment Variables Reference
| Variable | Required | Description | Example |
|---|---|---|---|
POSTMARK_API_TOKEN | Yes | Your Postmark server API token | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
EMAIL_PROVIDER | No | Force Postmark as provider | postmark |
DEFAULT_FROM_EMAIL | No | Default sender email | noreply@yourdomain.com |
DEFAULT_FROM_NAME | No | Default sender name | Your App Name |
Message Streams
Postmark organizes emails into message streams. By default, ShipFree uses the Transactional stream, which is perfect for:- Authentication emails (OTP, password reset)
- Order confirmations
- Account notifications
- System alerts
Development vs. Production
Development Setup
Production Setup
Monitoring & Analytics
Postmark provides excellent monitoring tools:Activity Dashboard
View real-time email activity:- Go to your server dashboard
- Click Activity
- See sent, delivered, bounced, and spam complaints
Message Search
Search for specific emails:- Navigate to Messages
- Filter by recipient, subject, or date
- View full email content and delivery details
Webhooks
Postmark can notify your app of email events:Pricing
Postmark pricing:- Free Tier: 100 emails/month (perfect for testing)
- Starter: $15/month for 10,000 emails
- Growing: $75/month for 50,000 emails
- Scale: Custom pricing for higher volumes
Troubleshooting
Error: 'Postmark not configured'
Error: 'Postmark not configured'
The
POSTMARK_API_TOKEN is missing or invalid.Solution:- Verify
POSTMARK_API_TOKENis set in.env - Check token is from the Server API tokens tab (not Account token)
- Restart your application
Error 406: 'Inactive recipient'
Error 406: 'Inactive recipient'
The sender signature is not verified.Solution:
- Go to Postmark → Sender Signatures
- Verify your email address or domain
- Ensure
DEFAULT_FROM_EMAILmatches verified address/domain
Error 422: 'Invalid From address'
Error 422: 'Invalid From address'
You’re sending from an unverified address.Solution:
- Add and verify the sender signature in Postmark
- Or verify the entire domain
- Update
DEFAULT_FROM_EMAILto match verified sender
Emails going to spam
Emails going to spam
Improve deliverability:
- Verify domain instead of single email
- Add DKIM and Return-Path DNS records
- Set up DMARC policy for your domain
- Monitor bounce rates in Postmark dashboard
- Use authenticated domain in From address
Batch send failed
Batch send failed
Check batch limits:
- Maximum 500 emails per batch request
- Each email must be under 10MB
- All From addresses must be verified
Code Reference
The Postmark provider implementation:createPostmarkProvider()- Initialize provider (line 128)send()- Send single email (line 51)sendBatch()- Send batch emails (line 86)
Additional Resources
Postmark Documentation
Official Postmark docs and guides
Postmark Dashboard
Manage servers and view analytics
API Reference
Complete API documentation
DMARC Guide
Set up DMARC for better deliverability