SHARE
TWEET

Untitled

a guest Jun 27th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { sp,  EmailProperties } from "@pnp/sp";
  2.      
  3. public onInit(): Promise<void> {
  4.     return super.onInit().then(_ => {
  5.       // establish SPFx context
  6.       sp.setup({
  7.         spfxContext: this.context
  8.       });
  9.  
  10.     });
  11.   }
  12.      
  13. const emailProps: EmailProperties = {
  14.           To: ["test@myorganisation.com"],
  15.           Subject: "This email is about...",
  16.           Body: "Here is the body. <b>It supports html</b>"
  17.         };
  18.  
  19.         sp.utility.sendEmail(emailProps).then(_ => {
  20.           console.log("Email Sent!");
  21.         });
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top