On this page:


<txp:email />

The email tag is both a single tag and a container tag. Textpattern will replace it with a mailto: email link, according to the attributes set.


Tag will accept the following attributes (case-sensitive):

The email address from which to make the link.
Values: Any valid email address.
Default: unset.
The displayed link text.
Values: Any text.
Default: Contact.
The title attribute to assign to the link.
Values: Any valid HTML title.
Default: unset.


<txp:email email="" linktext="Contact me" title="Send me an email" />

Example 2: Pre-populate message subject and body

<txp:email email=" ipsum&body=Sit amet…" />

Example 3: Container example

<txp:email email="" title="Email me!">
    <img src="/images/email.png" alt="Email">

Example 4: With Symbolset’s ‘email’ glyph

If you happen to use the ‘email’ glyph in the social media set of Symbolset, you can still use this tag. Let’s say you’re creating a social button bar using Symbolset glyphs in a list. The normal way to do this would be to set up your selectors on the individual anchor elements, like the first three list items show below. For the email glyph you need to put the selectors in the <li> since you can’t put them in the <a>, as the last list item shows:

<ul class="socbar">
        <a href"" class="ss-icon twit">twitter</a>
        <a href="" class="ss-icon gplus">googleplus</a>
        <a href="" class="ss-icon in">linkedin</a>
    <li class="ss-icon email">
        <txp:email email="" linktext="email" />

If you’re using Symbolset, then you’ll know that the linktext=" attribute value in the last list item above has to be email for the glyph to work. Then the CSS must be like follows to target both instances of Symbolset glyph use:

/** Common rules **/, a {
    /** design as you want **/

/** Target each one if specific hover effect is wanted **/
.twit:hover {
    /** design as you want **/
 etc a:hover {
    /** design as you want **/

See the feed_link tag for a similar solution for Symbolset’s ‘rss’ glyph.


Version 4.0.5

Can be used as a container.

See something wrong in this document? Outdated info, a broken link, faulty code example, or whatever? Please open an issue and we’ll investigate.