Custom domains

You can use the following optional MIME headers to set a custom domain:

  • X-Clab-SmartRelay-TrackingDomain

    Sets the same domain for view tracking and link tracking, as well as the base URL for unsubscribe links.

  • X-Clab-SmartRelay-TrackingDomainView

    Sets the domain for view tracking.

  • X-Clab-SmartRelay-TrackingDomainLink

    Sets the domain for link tracking.

  • X-Clab-SmartRelay-UnsubscribeDomain

    Sets the base URL for unsubscribe links.

Use

X-Clab-SmartRelay-TrackingDomain

Use to set the custom domain for view tracking, link tracking and the base URL for unsubscribe links.

Example:

Set the custom domain to example.com:

{% highlight java %}
Session session = Session.getInstance( System.getProperties(), null );
Message msg = new MimeMessage( session );
msg.setHeader( “X-Clab-SmartRelay-TrackingDomain”, “example.com” );
{% endhighlight %}

Using the above example, X-Clab-SmartRelay-TrackingDomain generates links formatted in a similar way to the following:

  • View tracking:
    • "http://t.example.com/v/<customer_id>/<delivery_id>/<mailq_id>"
  • Link tracking:
    • "http://t.example.com/c/<customer_id>/<delivery_id>/<mailq_id>/1/<encrypted_link>"
  • Unsubscribe links:
    • "http://cs.example.com/service/unsubscribe/wfc/<...>"

Using X-Clab-SmartRelay-TrackingDomain is the equivalent of setting X-Clab-SmartRelay-TrackingDomainView, X-Clab-SmartRelay-TrackingDomainLink and X-Clab-SmartRelay-UnsubscribeDomain to the same domain.

X-Clab-SmartRelay-TrackingDomainView

Use to set the custom domain for view tracking. X-Clab-SmartRelay-TrackingDomainView overrides the domain set by X-Clab-SmartRelay-TrackingDomain for view tracking.

Example:

Set the custom domain for view tracking to http://t.example.com:

{% highlight java %}
Session session = Session.getInstance( System.getProperties(), null );
Message msg = new MimeMessage( session );
msg.setHeader( “X-Clab-SmartRelay-TrackingDomainView”, “http://t.example.com” );
{% endhighlight %}

Using the above example, X-Clab-SmartRelay-TrackingDomainView generates a link formatted in a similar way to the following:

  • "http://t.example.com/v/<customer_id>/<delivery_id>/<mailq_id>"

Use to set the custom domain for link tracking. X-Clab-SmartRelay-TrackingDomainLink overrides the domain set by X-Clab-SmartRelay-TrackingDomain for link tracking.

Example:

Set the custom domain for link tracking to http://t.example.com:

{% highlight java %}
Session session = Session.getInstance( System.getProperties(), null );
Message msg = new MimeMessage( session );
msg.setHeader( “X-Clab-SmartRelay-TrackingDomainLink”, “http://t.example.com” );
{% endhighlight %}

Using the above example, X-Clab-SmartRelay-TrackingDomainLink generates a link formatted in a similar way to the following:

  • "http://t.example.com/c/<customer_id>/<delivery_id>/<mailq_id>/1/<encrypted_link>"

X-Clab-SmartRelay-UnsubscribeDomain

Use to set the base URL for unsubscribe links. X-Clab-SmartRelay-UnsubscribeDomain overrides the base URL for unsubscribe links set by X-Clab-SmartRelay-TrackingDomain.

Example:

Set the base URL for unsubscribe links to http://cs.example.com/service:

{% highlight java %}
Session session = Session.getInstance( System.getProperties(), null );
Message msg = new MimeMessage( session );
msg.setHeader( “X-Clab-SmartRelay-UnsubscribeDomain”, “http://cs.example.com/service” );
{% endhighlight %}

Using the above example, X-Clab-SmartRelay-UnsubscribeDomain generates a link formatted in a similar way to the following:

  • "http://cs.example.com/service/unsubscribe/wfc/<...>"

Next page:

Protecting your SmartRelay implementation from abuse