Set up DMARC and see who's sending email using your brand's domain.

Postmark for WordPress FAQ

How do I install the Postmark for WordPress plugin?#

  1. Upload the postmark directory to your /wp-content/plugins directory or install it by searching for it in your admin area's Plugins > Add New page.
  2. Activate the plugin in WordPress admin.
  3. In WordPress admin, go to Settings then Postmark. You will then want to insert your Postmark details, including your Postmark server API token and email address to send from. If you don’t already have a Postmark account, sign up now.
  4. Verify it is working correctly by entering a recipient email address you have access to and pressing the Send Test Email button.
  5. Once verified, then check Enable to override wp_mail and send using Postmark.

Why isn't Postmark appearing in my Settings after being activated?#

Postmark for WordPress checks to see if there are any other plugins using the wp_mail function. If another plugin is using the wp_mail function, it will prevent Postmark from appearing in the Settings menu. To resolve the conflict, deactivate any plugins also using the wp_mail function.

Why are my test emails failing?#

If you have not yet confirmed the sender signature or verified the domain you are trying to send a test email from, you will see an error when trying to send a test email. To resolve this, add and confirm the sending address as a sender signature in your Postmark account or add the sending domain to your Postmark account and verify it using a DKIM record.

Why are password reset links not showing in emails sent with this plugin?#

There are a couple ways to resolve this issue.

  1. Open the Postmark plugin settings and uncheck Force HTML and click Save Changes. If the default WordPress password reset email is sent in Plain Text format, the link will render as expected.
  2. Access your WordPress site directory and open the wp-login.php file.

Change this line:

$message .= ‘<‘ . network_site_url(“wp-login.php?action=rp&key=$key&login=” . rawurlencode($user_login), ‘login’) . “>\r\n”;

Remove the brackets, so it becomes:

$message .= network_site_url(“wp-login.php?action=rp&key=$key&login=” . rawurlencode($user_login), ‘login’) . “\r\n”;

Does the plugin work with multisite WordPress instances?#

Not at this time.

What plugins is Postmark for WordPress compatible with?#

Any plugin that sends emails using the wp_mail function is compatible with Postmark for WordPress.

Can I use open and click tracking with the plugin?#

Open tracking can be enabled in the plugin settings. Click tracking can also be used but should be enabled in the Postmark UI, specifically within your Message Stream's Settings page.

How do I handle errors?#

With the Postmark for WordPress plugin, it's possible to listen for and handle errors and successes during sending. You can register for two types of events using the following snippets:

Capture the result of the last successful send:

//define a callback for the result of a send to wp_mail.
function postmark_send_callback($response, $headers) {
 //handle the response from the wp_mail request.

//register this the callback
$priority = 10;
$callback_args_count = 2;
add_action('postmark_response', 'postmark_send_callback', $priority, $callback_args_count);

Capture the last error from the plugin:

//define an callback when for when wp_mail produces an error.
function postmark_error_callback($response, $headers) {
 //handle the response from the wp_mail request.

//register the callback
$priority = 10;
$callback_args_count = 2;
add_action('postmark_error', 'postmark_error_callback', $priority, $callback_args_count);

How do I tag a message?#

There are two ways to tag a message:

  1. Set an X-PM-Tag message header, i.e. array_push( $headers, ‘X-PM-Tag: PostmarkPluginTest’ ); where you are calling wp_mail().
  2. Add a filter for ‘postmark_tag’ that hooks into a function that returns the tag you desire.

Using the postmark_tag filter will override a tag set via message headers.

See our FAQ on Metadata to learn more about our metadata feature

How do I add metadata a message?#

Add a filter for ‘postmark_metadata’ that hooks into a function which returns the array of metadata you wish to attach to a message.

See our FAQ on tags to learn more about our tags feature

Last updated June 27th, 2023

Still need some help?

Our customer success team has your back!