Grow with us: Join Postmark's new referral partner program and start earning
x

How to send on behalf of your customers with Postmark

Postmark offers several options when sending on behalf of your customers. Each choice varies in both technical complexity and effort. 

For an overview of what you need to know when sending on behalf of your users, feel free to view our 30-minute webinar below.

Know your options #

How you decide to authenticate your customers domains will depend on how much access they will allow you to have to their DNS records. Here are three options for authenticating domains in Postmark.

Fully aligned and authenticated customer domain #

In an ideal world, sending on behalf of your customers would use a custom domain with fully aligned authentication. This includes DKIM and Return-Path. However, your customers won’t always be comfortable modifying DNS, or, in some cases, they may not be able to add entries to their company’s DNS. 

The other challenge with this approach is that it requires either significant development to handle on your end or significant manual intervention to set up authentication for each customer domain. While authenticating domains can’t guarantee delivery, it does maximize your customers’ opportunity for reliable delivery.

Here’s what a fully authenticated domain looks like in Postmark.

Fully authenticated domains have DKIM and Return Path verified.

Verified From address #

When your customer can’t fully authenticate their domain for sending with your service, you can still send from their email address. However, without the authentication, some email clients like Gmail and Outlook will display “via” or “on behalf of” tags in conjunction with the sending address. Also, while Postmark offers this option, it’s not something that’s available from all email providers.

With this process, you still want to verify that your customer controls the “From” address that you’ll be using. To do this, you need to use Postmark’s verification process to send an email to the address and have the user either follow a link sent to that email address to verify ownership.

From address is verified, but DKIM and Return Path are not

The customer will only be able to send from the verified address since DKIM and Return Path are not verified. 

Custom From Name #

The final option is the simplest both in terms of implementation effort on your part and configuration effort on the part of your customer. You can send the emails from your own domain and simply specify a different “From” name when you send the email. You could also potentially set up unique email addresses for each customer. Here’s what that would look like in Postmark.

Let’s say you own the domain learncodewith.us, and your customer wants to use Jane at Howdy as the From name for their email and set Jane@howdy as the Reply To. For your customer, they would only need to provide the sender name. 

Your sending emails from your domain, but the From address shows your client’s name

One catch to be aware of with this approach is that some email clients will aggressively add new contacts to recipient address books, and someone may unintentionally be added to an address book with the wrong email address associated with their name. One solution is to update the name to say “Jane Customer via (vendor)” so that it’s clear it’s not the sender’s primary email address.

What’s the best approach? #

It depends on your priorities and how much access your customers allow you to have over their DNS records. Each of these options has significantly different benefits. If giving your customer control over their brand is of the utmost importance, you might want to focus on fully aligned authentication for your customers’ domains. However, if your customers tend to be less technical, providing a more straightforward process with fewer steps is likely the right move. There are quite a few variables to consider. 

One important thing to remember is that you can always start simple and expand your options over time. For version one, you may just offer a single option and then wait to see what your customers are most interested in. You’ll have to weigh your options and choose the one that feels best for your goals.

Compare and contrast which option is best for you

Authenticating domains using the API #

As an agency using Postmark, there are likely many domains you’ll need to add to Postmark. You can add domains using our web application or via our API. 

Here are the steps to authenticate your domain.

Step 1: Add your domain to Postmark using the Domains API #

{
"Name": "yourdomain.com",
"ReturnPathDomain": "pm-bounces.yourdomain.com"
}

Step 2: Copy the following values over to your domain DNS records #

    • DKIMPendingHost
    • DKIMPendingTextValue
    • ReturnPathDomain
    • ReturnPathDomainCNAMEValue

Add the DKIMPendingHost in the Host field and add the DKIMTextValue as a TXT type.

Adding DKIM to host DNS records

Add the ReturnPathDomain in the Host field and add ReturnPathDomainCNAMEValue as a CNAME type.

Adding Return Path as CNAME to host DNS records

Step 3: Verify DKIM and Return Path via the API #

Using the API run a PUT request to verify the domain in Postmark

curl "https://api.postmarkapp.com/domains/{domainid}/verifyDkim" \
-X PUT \
-H "Accept: application/json" \
-H "X-Postmark-Account-Token: account token"

See it in action — fully authenticate a domain via API #

Webhook use cases for bounces #

One of the reasons you send emails through Postmark is to handle all of the possible bounces that email servers can return.  That's why we offer Bounce Webhooks for transactional Message Streams and Subscription Change Webhooks for Broadcast Message Streams. These webhooks will push data to your application in an easily parsable, JSON format, as soon as Postmark processes the bounce report. Your webhook would receive data for Hard Bounces, Soft Bounces, Undeliverable bounces, etc. Here are a few ways you can use bounce data. 

Correct bounced email addresses #

Bounce and Subscription Change webhooks are a great way your customers can be aware of bounces without having full access to Postmark. For example, you could instantly help users correct their sign up email address if it bounces. As an agency, this will be helpful to you because it doesn’t require your direct involvement. Your customers can configure bounce webhooks on their transactional Message Streams and Subscription Change Webhooks on their broadcast Message Streams so that they will be notified if an email isn’t delivered for any reason. Once they’ve received the notification, they can advise their customers to make the necessary changes.

Activate bounces via the API #

You could use the data received from the webhooks to delete bounced recipients from Suppressions due to a hard bounce in order to reactivate them. You can also use our Spam Complaint webhook to be notified of when a customer explicitly marks a message as spam. Spam complaints can only be reactivated by the Postmark Support team.

Alert your team when emails bounce #

You could use the data to alert your team when certain emails bounce. An easy way to get bounce notifications is through our official Slack App. Search for "Postmark Bot" in the Slack App Directory, or install directly from the Slack app page.

For a low-effort method of using webhooks to alert your senders of bounces, check out our help article on how to use Zapier to alert your senders of bounces automatically.

Rebound #

Rebound is a nifty integration that lets your customers know about delivery issues straight from your web app! Hard bounces can be a pain to deal with, and troubleshooting them can be confusing. If an email sent to your customer hard bounces, the customer is stuck waiting for it to show up. It may not be your fault, but most customers won’t see it that way. To them, the email is just missing.

Rebound is an embeddable javascript snippet that prompts customers to update their email address if there was a hard bounce. This way customers aren't left in the dark about delivery issues. 

Alert notification from Rebound

The Rebound JavaScript snippet (once installed on your website) will tap into the Postmark API to check for hard bounces and prompt your customers to update their email address if they've experienced deliverability issues in the past.

Your customers can use Rebound to take the pain out of hard bounces so they can focus on more important things. Get started integrating Rebound today.

This post was originally published Oct 30, 2018

Still have questions?

  • Anna Ward Anna
  • Ignacio Roig Ignacio

Ask us anything! We’re eager to help you with any problem or question you have…

Contact us