uma-sp
v1.0.14
Published
Utility functions to interact with SharePoint Online that builds on top of PnP-JS-Core.
Downloads
5
Readme
Motivation
A set of utilities that revolve around SharePoint.
Installation
npm install uma-sp --save
Usage
import * as uma from 'uma-sp';
Initialize the setup
You need to tell the library what is the SharePoint list name (a list that resides on the Root Web) that contains all your templates.
uma.emailSetup({
templatesListName: 'Workflow Email Templates'
});
Get Template and Send Email
The signature is getTemplateAndSend(templateName, templateParams, from, to, subject)
uma.email.getTemplateAndSend("Initiate", {Title: "TestEmail", Body: "Lorem Ipsum...."}, "[email protected]", "[email protected]", "The subject of your email").then(result => {
console.log("Email sent successfully: " + result);
});
Send Email
The signature is send(from, to, body, subject)
uma.email.send("[email protected]", "[email protected]", "The content of the email...", "The subject of your email").then(result => {
console.log("Email sent successfully: " + result);
});
API Reference
This package has dependencies on sp-pnp-js and lodash libraries