Setting Up Email via the Postmark API
Postmark is a premium service specialized in transactional emails with lightning-fast delivery and an excellent IP address reputation. LockMyCal supports sending emails directly through Postmark's native HTTP API, which eliminates the delays and complications associated with classic SMTP.
Advantages of the direct integration with Postmark
- Delivery speed: Emails go out through the secure REST API in a fraction of a second.
- Detailed logging: In the Postmark interface, you see the exact state of delivery, opens and any errors (bounces).
- High inbox deliverability (Inbox): Postmark strictly separates transactional mail from marketing mail.
1. Getting the Server API Token in Postmark
- Sign in to your account at postmarkapp.com.
- Go to your Server (e.g. LockMyCal Production).
- Click the API Tokens tab.
- Copy the Server API Token value.
2. Verifying the sending domain (DKIM and SPF)
For maximum deliverability, verify your sending domain in the Sender Signatures / Domains section and add the records to your DNS:
- DKIM: A CNAME or TXT record according to Postmark's instructions.
- Return-Path (SPF): A CNAME record for a dedicated subdomain (e.g.
pm-bounces.yourdomain.com).
3. Configuration in LockMyCal (Environment variables)
In the .env file or in the Docker configuration, set:
# Set the email adapter to Postmark
EMAIL_ADAPTER=postmark
POSTMARK_API_KEY=your_postmark_server_api_token_here
# Sender address (must match the verified domain)
EMAIL_FROM_ADDRESS=bookings@yourdomain.com
EMAIL_FROM_NAME="LockMyCal Bookings"
After restarting the container, all email confirmations, calendar invitations and reminders will be sent directly through Postmark's infrastructure.
Note
The other API providers can be used in the same way: EMAIL_ADAPTER=sendgrid (SENDGRID_API_KEY), mailgun (MAILGUN_API_KEY, MAILGUN_DOMAIN) or ahasend (AHASEND_API_KEY, AHASEND_ACCOUNT_ID).