Skip to content

Instantly share code, notes, and snippets.

@TBag
Created February 1, 2017 19:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save TBag/665d6cc3146d1a3266a30243be6bfe6b to your computer and use it in GitHub Desktop.
Save TBag/665d6cc3146d1a3266a30243be6bfe6b to your computer and use it in GitHub Desktop.
SpFxFlowEmailWepPart sendEmail method
private sendEmail() {
if (!this.properties.flowURL) {
this.context.statusRenderer.renderError(this.domElement, "Flow URL is missing. Open the property pane and specify a Flow URL.");
return;
}
if (!this.validateEmail(this.properties.emailAddress)) {
this.context.statusRenderer.renderError(this.domElement, "Email address is not valid. Open the property pane and specify a valid email address.");
return;
}
else {
this.sendEmailViaOffice365Outlook(this.properties.emailAddress,
this.properties.emailSubject,
this.properties.emailBody);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment