Email Links in Experience Builder?

6514
24
Jump to solution
08-05-2020 08:38 AM
by Anonymous User
Not applicable

How can I set email links in buttons/text? I try using mailto:somebody@company.com?subject=Hello as a Web Address. When i click on the button/link, nothing happens.

0 Kudos
24 Replies
LindaSlattery
Occasional Contributor

Nice find, @SallyCox1 ! It works perfectly! This was something that was giving me grief for some time.

0 Kudos
LindaSlattery
Occasional Contributor

However, if you are trying to link to an email that is an attribute in the feature layer, I cannot get it to work. I have a list in ExB and email is a field that is unique to each data point. Any suggestions on this?

0 Kudos
TonghuiMing
Esri Regular Contributor

Starting from AGOL 10.3, you can configure mailto and some other URI schemes directly in the 'Set Link > URL' for widgets like Button, Image, etc. See details in:

https://doc.arcgis.com/en/experience-builder/latest/build-apps/add-widgets.htm#ESRI_SECTION1_0F7788F...

0 Kudos
LindaSlattery
Occasional Contributor

@TonghuiMing it still doesn't work correctly. The email tries to open the attribute instead of the email that is actually in the data (see screenshot below). In the URL box, I am typing in mailto:{resource_contact_email2}. Should I be doing something else?

LindaSlattery_0-1668456816824.png

 

0 Kudos
TonghuiMing
Esri Regular Contributor

All acceptable syntax for the supported schemes has been documented in the doc link posted above:

TonghuiMing_0-1668484662035.png

I don't think symbol {} is a valid syntax for any standard URI scheme. Besides, in your case, this seems like a dynamic email URL from a data source, while the Set Link > URL workflow in the Button widget (or others) only supports static URLs - Typing '{}' directly does not have the data structure for now so that's expected, unfortunately.

0 Kudos
JosephRhodes2
Occasional Contributor II

@LindaSlattery Did you click the button to the left of the URL box? It allows you to select an attribute from the connected data source:

JosephRhodes2_0-1668531544544.png

 

LindaSlattery
Occasional Contributor

Yes, @JosephRhodes2 , but you can't add the mailto: text in front of the attribute

0 Kudos
JosephRhodes2
Occasional Contributor II

@LindaSlattery Use the Expression button, then enter 

"mailto:" + {your_email_field}

as the expression.

LindaSlattery
Occasional Contributor

@JosephRhodes2 , you are a genius!!! That worked! Thank you so much

0 Kudos
jauhari_mani
Occasional Contributor

@LindaSlattery @JosephRhodes2 I want to add attributes in the subject and body of the mail,But i am not able to achieve it.Can you pls explain the steps how we can achieve that?

jauhari_mani_0-1680586205913.png

 

0 Kudos