문제

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.

send email to external users PnP core js.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top