Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { sp, EmailProperties } from "@pnp/sp";
- public onInit(): Promise<void> {
- return super.onInit().then(_ => {
- // establish SPFx context
- sp.setup({
- spfxContext: this.context
- });
- });
- }
- const emailProps: EmailProperties = {
- To: ["test@myorganisation.com"],
- Subject: "This email is about...",
- Body: "Here is the body. <b>It supports html</b>"
- };
- sp.utility.sendEmail(emailProps).then(_ => {
- console.log("Email Sent!");
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement