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.
Solved! Go to Solution.
Nice find, @SallyCox1 ! It works perfectly! This was something that was giving me grief for some time.
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?
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:
@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?
All acceptable syntax for the supported schemes has been documented in the doc link posted above:
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.
@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:
Yes, @JosephRhodes2 , but you can't add the mailto: text in front of the attribute
@LindaSlattery Use the Expression button, then enter
"mailto:" + {your_email_field}
as the expression.
@JosephRhodes2 , you are a genius!!! That worked! Thank you so much
@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?