Unable to send Mail to DL group using SP Utility Rest API

Shiv Sharma 1 Reputation point
2020-08-06T09:13:44.683+00:00

Unable to send Mail to DL group using SP Utility Rest API

in To it is null blank

SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,608 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Leon Laude 85,786 Reputation points
    2020-08-06T09:24:55.387+00:00

    Hi,

    You have posted in the Partner Center API forum, since your issue is related to SharePoint REST API I suggest you ask over at the dedicated SharePoint REST API forum over here:
    https://video2.skills-academy.com/en-us/answers/topics/office-sharepoint-server-development.html

    ----------

    (If the reply was helpful please don't forget to accept as answer, thank you)

    Best regards,
    Leon


  2. Jerryzy 10,571 Reputation points
    2020-08-07T08:28:18.083+00:00

    Hi @Shiv Sharma ,

    I tested to send email to distribution list using /_api/SP.Utilities.Utility.SendEmail, it will have such error:

    16394-image-1.png

    This is because of /_api/SP.Utilities.Utility.SendEmail is resolving based on user Principle, Distribution list is not the SharePoint user so cause the error, please check the blog for detailed information:

    One of the reasons of why sending email via client object model may not work in Sharepoint

    The workaround is that if you want to send email to multiple users, you can define a arrray for To like the code as attachment :

    16411-code-2.txt


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.