Feb 01 2018 12:01 PM
Hi, I want to be able to send an email message to a specific O365 group from a SharePoint site.
Is that possible? Is there a Web Part with corresponding form fields?
Feb 01 2018 12:56 PM
Feb 01 2018 04:15 PM
Not sure it this is what you need, but another way is to use the list view and add a customer format for the column with the person in.
Create a list, add a person field. Then click on the column header and format this column as follows:
A panel will open at the right, allowing you to paste in json.
Info for setting this up can be found here:
https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting
I just pasted one of the example on that page, and it created the little red email icon in the pic above. When clicking on that it opens a pre-defined email template.
Here's the json I from the example, which I then tweaked as I needed:
{ "elmType": "div", "children": [ { "elmType": "span", "style": { "padding-right": "8px" }, "txtContent": "@currentField.title" }, { "elmType": "a", "attributes": { "iconName": "Mail", "class": "sp-field-quickAction", "href": { "operator": "+", "operands": [ "mailto:", "@currentField.email", "?subject=Task status&body=Hey, how is your task coming along?.\r\n---\r\n", "@currentField.title", "\r\nClick this link for more info. http://contoso.sharepoint.com/sites/ConferencePrep/Tasks/Prep/DispForm.aspx?ID=", "[$ID]" ] } } } ] }
Feb 01 2018 04:20 PM
Feb 01 2018 04:20 PM
Feb 02 2018 02:18 AM
Hi and thank you. I don`t know how to change the field name.
I want to send the text an attachments to the group.
Feb 02 2018 10:50 AM
I don`t know what you mean with the text Webpart.
When I want to create a new app, there is no ext Webpart.
Do you have a screenshot?
Feb 02 2018 11:08 AM
Feb 04 2018 11:23 AM
If you are using a person then use the original jason.
If you are using a text field then you need to go through the json and change the name. For your field called group the json would be:
{
"elmType": "div",
"children": [
{
"elmType": "span",
"style": {
"padding-right": "8px"
},
"txtContent": "@currentField"
},
{
"elmType": "a",
"attributes": {
"iconName": "Mail",
"class": "sp-field-quickActions",
"href": {
"operator": "+",
"operands": [
"mailto:",
"[$Group]",
"?subject=\r\n---\r\n"
]
}
}
}
]
}
for sender it would be:
{
"elmType": "div",
"children": [
{
"elmType": "span",
"style": {
"padding-right": "8px"
},
"txtContent": "@currentField"
},
{
"elmType": "a",
"attributes": {
"iconName": "Mail",
"class": "sp-field-quickActions",
"href": {
"operator": "+",
"operands": [
"mailto:",
"[$Sender]",
"?subject=\r\n---\r\n"
]
}
}
}
]
}
Feb 07 2018 12:00 AM
Hi Stephen,
Thank You.
But ' Change the name ': What word do I need to change?
The Mail icon is not displayed.
No email will be sent.
It would be best if the message I would not only stored in the list, but it would be sent automatically with the save. (button "speichern")
Best regards
Olaf