ArcGIS Online

Send email from 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 shows you how to send an email directly from a pop-up, and 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).

You can follow along using a sample web map. In the upper right, sign in to your account.

Sign In

The map contains two layers; Office Location (unconfigured) and Office Location (configured).

Map layers

The unconfigured layer does not have a configured pop-up; it’s the default and unimproved display of attributes. Use this layer to follow along with the instructions below. The configured layer uses a configured pop-up with all the email options described in this post.

 

The unconfigured pop-up

Click the symbol on the map to display the pop-up.

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

Unconfigured pop-up

Using the techniques described below, the pop-up can be configured to use both attributes in different ways as clickable email links in the layer pop-up. The Photo_URL attribute is a link to a graphic that will be used to beautify the pop-up.

 

Configuring the pop-up

In the Layers pane, click the unconfigured layer to select it. A blue bar will highlight the selected layer.

Select layer

In the Settings (light) toolbar on the right, click Configure pop-ups.

Configure pop-ups

This displays the pop-up pane. To set the stage for our pop-up, first edit the title to remove the unneeded extra word “Office” by highlighting it, then clicking the delete key on your keyboard.

 

Edit title

Next, remove the Fields list by clicking options (…), then Delete.

Delete fields list

Only the modified title is displayed in the pop-up.

Pop-up

Now the pop-up can be configured in a variety of ways to enable an email link from the pop-up window using both the Mailto and Email attributes. Follow the steps below.

 

Case 1: Email stored as mailto link

The Mailto string can be configured as a mailto link in the pop-up using two methods; the first is using a custom attribute display, the second uses a link from an image.

 

Method 1 – Use a text link in a custom attribute display

Step 1 — In the Pop-up pane click Add content.

Step 2 — Choose Text.

Add text to pop-up

Step 3 — Add text and attributes. To use an attribute along with text, start by typing a curly bracket ( { ) to display a list of attribute fields.

Next, enter the text string to use for the email link and select it.

Step 4 — After selecting the text, click the Link button.

Step 5 — In the Link URL input, enter {Mailto}. This is the attribute that contains the mailto link.

Tip: You can add the {Mailto} field to your custom attribute display, then cut and paste it into the Link input instead of typing it in.

Step 6 — Click the checkmark to save, then click OK when finished and save the map.

The pop-up now includes a clickable Send email link.

Pop-up

 

Method 2 – Use an image link

Continuing from the steps above, follow these steps to add an image that opens the mailto link when clicked.

Step 1 — In the Pop-up pane click Add content.

Step 2 — Choose Image.

Add pop-up image

Step 3 — In the URL input, click the curly brackets ( { } ) to display a list of fields.

Image URL input

Step 4 — Select Photo_URL from the list. The Photo_URL field contains the link to the photo.

Select field

Tip: Click the information button for any field to learn more about the field formatting and values.

Field information

Step 5 — When the photo is clicked, the mailto link should open. In this step select the Mailto field as the Link field for the photo. Click the curly brackets as done in Step 3 above to display the field list to find the field.

Add image link

Step 6 — When finished, click Done at the bottom of the Configure image pane and save your map.

The pop-up now includes an image which, when clicked (or tapped if using a device) will send an email.

Completed pop-up

 

Case 2: 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 for both methods—text link and image link—discussed above.

Text link in a custom attribute display

Using a combination of text and the {Email} field, construct a a mailto link.

Mailto link

Image link

Construct the mailto link the same was as shown above in the image Link URL property.

Mailto link

 

Summary

Using the sample map, sign in to your account and turn off the unconfigured layer and turn on the configured layer. Click the point location on the map to view a pop-up configured with all the options described above. Send me an email, and let me know what you think!

 

Configured pop-up

 

More information

Custom attribute displays and links from images in pop-ups provide opportunities to customize the capabilities presented in pop-ups, including the ability to create a link to send an email.

For more information see:

Configure pop-ups

Pop-ups: the essentials

This post was originally published on October 1, 2015, and has been updated.

About the author

Corporate tech evangelist and senior principal product manager at Esri, focusing on ways to broaden access to geographic information and helping users succeed with the ArcGIS online system. On a good day I'm making a map, on a great day I'm on one. Follow @bernszukalski or email bszukalski@esri.com

Connect:

Next Article

New Technical Paper: ArcGIS Mobile Apps & Mobile Device Management (MDM) Support

Read this article