Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Nov 15th, 2018 75 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. var urlTemplate = appweburl + "/_api/SP.Utilities.Utility.SendEmail";
  2.  $.ajax({
  3.     contentType: 'application/json',
  4.     url: urlTemplate,
  5.     type: "POST",
  6.     data: JSON.stringify({
  7.         'properties': {
  8.             '__metadata': { 'type': 'SP.Utilities.EmailProperties' },
  9.             'From': 'steve.curran@somewhere.com',
  10.             'To': { 'results': ['smc750@somewhere.com'] },
  11.                 'Body': 'Hello',
  12.                 'Subject':'remember'
  13.             }
  14.     }
  15.   ),
  16.     headers: {
  17.         "Accept": "application/json;odata=verbose",
  18.         "content-type": "application/json;odata=verbose",
  19.         "X-RequestDigest": $("#__REQUESTDIGEST").val()
  20.     },
  21.     success: function (data) {
  22.         var result = data.d.results;
  23.         var i = result.length;
  24.     },
  25.     error: function (err) {
  26.         alert(JSON.stringify(err));
  27.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top