Learning & Support


Custom URL Schemes: Advanced Mailto hyperlinks

Twixl Support Team Updated: - Created :

    Using Hyperlinks in Twixl InDesign articles, you can launch the reader's mail client and create a new mail message. This article explains how to use the mailto: syntax (so you can prefill some fields for your reader) and tackles some difficulties for Android devices.


    For more general info about using Hyperlinks in InDesign, check this article: Hyperlinks

    1. General Example

    1.1. What?

    Let's say you want to achieve the following result: A clickable hyperlink that will prepare a new email for your reader with a pre-defined and body.

    Field Value
    To: to@email.com
    CC: cc@email.com
    BCC: bcc@email.com
    Subject: This is the Subject.
    Body: This is the Body.

    1.2. Syntax

    The syntax for this example is as follows:  



    Syntax Description
    This is the startpoint, it opens the reader's mail-client with a new empty mail and the To: Field prefilled with the address to@email.com
    This syntax tells that you want to add an option to this url. In this case you want the CC: Field prefilled with the address cc@email.com . Extra options after the first option needs to be added with & as a prefix. The first option after mailto always needs the prefix ? . The following options can also be added:
    Option to prefill the BCC: Field
    Option to prefill the Subject: Field. Don’t forget to replace each space by %20.
    Option to prefill the Body: Field. Don’t forget to replace each space by %20.

    2. Example with a url in the predefined body.

    Adding a url to the body can be tricky. If you do this with the standard syntax, it will not work on Android devices.

    2.1. What?

    Field Value
    To: to@email.com
    Subject: A Body with a url.
    Body: https://www.twixlmedia.com

    2.2. Syntax

    The correct syntax for this example is as follows:


    So, the tricky part is the url. You can't use a standard url like https://www.twixlmedia.com . You will need to encode that url first. You can encode a url by using one of these free online tools:

    The result for https://www.twixlmedia.com will be https%3A%2F%2Fwww.twixlmedia.com . It's this encoded url that you need to embed in the syntax of your mailto: url.


    Always test your setup before you publish! More info about Preview on device can be found here.

    Was this article helpful?

    0 out of 0 found this helpful