Go to main content

Email

Contents

Syntax

<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.

Attributes

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

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

Examples

<txp:email email="donald.swain@example.com" linktext="Contact me" title="Send me an email" />

Example 2: Pre-populate message subject and body

<txp:email email="donald.swain@example.com?subject=Lorem ipsum&body=Sit amet…" />

Example 3: Container example

<txp:email email="donald.swain@example.com" title="Email me!">
    <img src="/images/email.png" alt="Email">
</txp:email>

Genealogy

Version 4.0.5

Can be used as a container.

If you notice any kind of problem with this page's construction or content (outdated information, typos, broken links, or whatever), open an issue to have it sorted. Or have a go at it yourself. :)