I have a simple SharePoint list of email template to send an email to our customers.
I have the basic JSON format that I got from here https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting#create-clickable-actions but I am trying to send an email based on the SharePoint field values. For example: if I click the email button on line1 the email will be send to [email protected]; [email protected] and CC [email protected]; [email protected] and the message will be the MessageBody column. everything works fine but I just don't know the syntax code for CC email.
Here is my SP List:
I used Single line text for both EmailTo and CC column.
and here is the Syntax I used:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"children": [
{
"elmType": "span",
"style": {
"padding-right": "50px"
},
"txtContent": "@currentField.title"
},
{
"elmType": "a",
"attributes": {
"iconName": "Mail",
"class": "sp-field-quickActions",
"href": {
"operator": "+",
"operands": [
"mailto:",
"[$EmailTo]",
"?subject=",
"[$Title]",
"&body=",
"Hello,",
"\r\n",
"\r\n",
"[$MessageBody]",
"\r\n",
"\r\n",
"\r\n",
"\r\n",
"Thank you,",
"\r\n",
"\r\n",
"\r\n \r\n",
"\r\n \r\n"
]
}
}
}
]
}
Email sample that shows using the code syntax above.

