Skip to content
MangoMap Help Centre
Esc
↑↓navigate↵open⌘Jpreview
On this page

How to add an email link to a custom popup

Add a link to a custom popup that starts an email in the viewer's email app, sent to one address or to each feature's own address, with a subject.

Add an email link to a custom popup, and viewers can click it to start an email in their own email app, with the address and subject filled in. A feature with no email address still shows the link, so hide the link on those features with a conditional.

See it on an example map

Open the Popup Media & Logic Lab. In the legend, turn on Sites — Links and turn off Sites — Default. Click a site. Its popup shows an Email this office link.

Before you start

Use one address for every feature

  1. In the Custom popup editor, place the cursor where you want the address.
  2. Type the email address, for example sales@example.com.
  3. Type a space.

The address becomes an email link. Every feature’s popup shows the same address. To add a subject or a message, click the link, click Edit, and follow Add a subject or a message.

Use a different address for each feature

Each value in the attribute is one email address:

office email
Central central+sg-0001@example.com
South south+sg-0002@example.com
  1. In the Custom popup editor, place the cursor where you want the link.
  2. Click Set link in the toolbar.
  3. Set Link type to Email.
  4. Click Insert simple variable at the end of the Email address field.
  5. Choose the attribute that holds the address.
  6. In Link Text (optional), type the words viewers click, for example Email this office.
  7. Click Add Link.
Add Link dialog with Link type set to Email, {email} in Email address, Enquiry about {name} in Subject, an empty Body, and Email this office in Link Text (optional)

Always fill in Link Text (optional). If you leave it empty, the popup shows the link itself, such as mailto:{email}, as the link text.

If the attribute already holds a complete email link that starts with mailto:, insert it the same way. The link still works. Leave Subject and Body empty, because the stored link carries its own.

Add a subject or a message

In the same dialog, type the subject in Subject and the message in Body. Type plain text, with line breaks if you want them. MangoMap encodes the spaces and punctuation for you.

Subject and Body each have their own Insert simple variable button, so the email can name the feature:

Enquiry about {name}

You can also paste a complete email link, such as mailto:sales@example.com?subject=Opening%20hours, into the Email address field. The dialog takes the subject and the message out of the link and puts them in Subject and Body.

If some features have no email address

When the attribute is empty, the link still shows, but the email it starts has no usable address. Wrap the link in a conditional that shows it only when the attribute has a value.

Click Save Changes at the bottom right of the editor. Click a feature on the map, then click the link. A new email opens in the viewer’s default email app, with the address, subject, and message filled in.

In this example popup, Email this office is the email link:

Map viewer with the Sites — Links popup open on National Museum of Singapore: Office: Central, the links Email this office, Call this office, Send a text message, Chat on WhatsApp, and Message on Messenger, and a View on Wikipedia button

If the dialog shows an error

  • Enter a valid email address. The Email address field holds something that is not one email address, such as a name or two addresses. Type one address, or insert a variable.
  • This link type is not supported. The field starts with a kind of link that popups do not support, such as ftp:. Popup links can be web, email, phone, or text message links only.