Email is not sending pnpjs in sharepoint online
-
08-02-2021 - |
Вопрос
I want to send mail to some users. But when i call send mail method, it shows no errors. but email not send.here is my code.
public emailProps: EmailProperties = {
To: ["abc@gmail.com"],
CC: ["def@gmail.com"],
Subject: "This email is about...",
Body: "Here is the body. <b>This is the test mail form SharePoint/b>",
};
public submit = () => {
sp.setup({
spfxContext: this.props.context
});
return sp.utility.sendEmail(this.emailProps).then(rec => {
console.log("Email Sent!", rec);
},
(ex) => {
console.log("error: ", ex);
});
}
Решение
According the below issue posted in GitHub, SharePoint REST API or PnP Core JS only sends an email to SharePoint site users NOT to external users.
Не связан с sharepoint.stackexchange