3

Is there a way I can send an email notification using SharePoint 2010?

If the form in SharePoint has updated by a person an email notification will be send to the registered email in SharePoint.

Can someone help me how I can do it?

Thank you in advance.

Aakash Maurya
  • 8,481
  • 4
  • 42
  • 74
Eme
  • 71
  • 1
  • 1
  • 3

3 Answers3

4

You can create Alert on list.

So, whenever anyone update item notification will automatically send to particular user.

To create Alert on SharePoint list please check this.

Samir Khimani
  • 2,233
  • 11
  • 16
3

I guess you can create a simple workflow to send the email when the form is modified.

In order to send email, you can refer this answer.

Aakash Maurya
  • 8,481
  • 4
  • 42
  • 74
2

We can send these notification using jquery. Below is the function for the same.

  sendEmail: function (webUrl, from, to, cc, subject, body, success, failure) {
  var urlTemplate = webUrl + "/_api/SP.Utilities.Utility.SendEmail";
  $.ajax({
   contentType: 'application/json',
   url: urlTemplate,
   type: "POST",
   async: false,
   data: JSON.stringify({
    'properties': {
     '__metadata': {
      'type': 'SP.Utilities.EmailProperties'
     },
     'From': from,
     'To': {
      'results': to
     },
     'CC': {
      'results': cc
     },
     'Body': body,
     'Subject': subject,
     'AdditionalHeaders': {
      "__metadata": {
       "type": "Collection(SP.KeyValue)"
      },
      "results": [
       {
        "__metadata": {
         "type": 'SP.KeyValue'
        },
        "Key": "content-type",
        "Value": 'text/html',
        "ValueType": "Edm.String"
                        }
                    ]
     }
    }
   }),
   headers: {
    "Accept": "application/json;odata=verbose",
    "content-type": "application/json;odata=verbose",
    "X-RequestDigest": jQuery("#__REQUESTDIGEST").val()
   },
   success: function (data) {
    success(data);
   },
   error: function (data) {
    failure(data)
   }
  });
 }

Where, webUrl is your site absolute url. from is an empty string. to,cc are array of email ids. subject,body are plain text/html string.

gachCoder
  • 480
  • 2
  • 8