Sending email from web map pop-ups

Email can be sent directly from web map pop-ups using pop-up configurations. Which configuration approach is best will be determined by how the email addresses are stored in the layer attributes. This post covers two examples of how the email might be stored – as an email address (somebody@company.com) and as a mailto link (mailto:somebody@company.com?subject=Hello).

The unconfigured pop-up

In the unconfigured pop-up shown below, the email address is stored in two ways. The Email field stores it as a string in the format somebody@company.com. The Mailto field stores it as a string in the link format mailto:somebody@company.com?subject=Hello.

Note that both emails are strings in the pop-up, and the mailto string is not recognized as a link.

Email stored as a mailto link

The Mailto string can be configured as a mailto link in the pop-up using two methods configure using Pop-up Properties.

Method 1 – Using a custom attribute display

1. From the Pop-up Properties choose A custom attribute display.

2. Click Configure.

3. Along with other desired text and attributes, enter a text string for the email link and select it.

4. Click Create Link to add a link to the selected text.

5. In the URL input, enter the field name containing the mailto string using the curly braces – in this case the field is {Mailto}. Tip: you can add the mailto field to your custom attribute display, then cut and paste it into the URL input instead of typing. You will notice a warning, but the warning can be disregarded.

6. Set the Link Properties.

7. Click OK, then save the pop-up configuration and map. The pop-up now includes the mailto attribute as a clickable link.

Method 2 – Using an image link

1. From the Pop-up Media section of Pop-up Properties choose Add Image.

2. In Configure Image add a Title and Caption as desired.

3. Choose a field for URL. This field contains a URL to an image that will be displayed, in this example it is an icon of a letter.

4. Add the field containing the mailto string to Link.

5. Click OK.

6. Save your pop-up configuration and your map. The pop-up now includes an image which can be clicked, or tapped if using a device, to send an email.

Email stored as address string

If the attribute field contains a standard email address string (somebody@company.com) a mailto link can be configured in the pop-up using two methods shown below.

Method 1 – Using a custom attribute display

1. From the Pop-up Properties choose A custom attribute display.

2. Click Configure.

3. Along with other desired text and attributes, enter a text string for the email link and select it.

4. Click Create Link to add a link to the selected text.

5. In the URL input, type the mailto link string using the field name containing the email address using the curly braces – in this case the field is {Email}. Tip: you can add the email field to your custom attribute display, then cut and paste it into the URL input instead of typing.

6. Set the Link Properties.

7. Click OK, then save the pop-up configuration and map. The pop-up now includes a clickable link using the email address string.

Method 2 – Using an image link

1. From the Pop-up Media section of Pop-up Properties click Add, then choose Image.

2. In Configure Image add a Title and Caption as desired.

3. Choose a field for URL. This field contains a URL to an image that will be displayed, in this example it is an icon of a letter.

4. Add the field containing the mailto string to Link.

5. Click OK.

6. Save your pop-up configuration and your map. The pop-up now includes an image which can be clicked, or tapped if using a device, to send an email.

A sample web map demonstrating the pop-up configurations can be viewed. For more information see Configure pop-ups.

This entry was posted in ArcGIS Online and tagged , , . Bookmark the permalink.

Leave a Reply

One Comment

  1. bkeinath says:

    This is really fantastic! Great instructions and I love the examples. I was able to implement this in a few minutes.