Back to column formats
Column formattingSharePoint Online

Multi-Person Mail To Link

This column formatting sample demonstrates how to add a mailto: link for each person in a multiple selection person column.

Multi-Person Mail To Link formatting preview
Sample preview · View original image

Copy. Apply. Make it yours.

Get this format

1 definition

Review the requirements below, then paste this JSON into the matching formatting panel. Show me where.

Use your list's internal column names and replace any tenant-specific URLs or flow IDs. Formatting is presentation, not a way to secure data.

Column formatting
Download JSON
{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "children": [
    {
      "elmType": "div",
      "children": [
        {
          "forEach": "personIterator in @currentField",
          "elmType": "div",
          "style": {
            "padding": "5px 0px"
          },
          "children": [
            {
              "elmType": "span",
              "txtContent": "[$personIterator.title]"
            },
            {
              "elmType": "a",
              "style": {
                "text-decoration": "none",
                "vertical-align": "middle"
              },
              "attributes": {
                "iconName": "Mail",
                "class": "ms-fontColor-themePrimary sp-field-quickAction",
                "href": "='mailto:' + [$personIterator.email] + '?subject=Task status&body=Hey, how is your task coming along?.\r\n---\r\n' + [$personIterator.title] + '\r\nClick this link for more info. http://contoso.sharepoint.com/sites/ConferencePrep/Tasks/Prep/DispForm.aspx?ID=' + [$ID]"
              }
            }
          ]
        }
      ]
    }
  ]
}

From the contributor

How to use this sample

Summary

This column formatting sample demonstrates how to add a mailto: link for each person in a multiple selection person column.

screenshot of the sample

This sample is derived from person-mailto.

View requirements

This format expects to be applied to a multiple selection person column.

Sample

Solution Author(s)
multi-person-mailto.json Ganesh Sanap

Version history

Version Date Comments
1.0 December 12, 2021 Initial release

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.