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.

3 Answers 3

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.

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.

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.