SP.Utilities.Utility.SendEmail returns « The e-mail message cannot be sent. Make sure the e-mail has a valid recipient. »

With Sharepoint you can use SP.Utilities.Utility.SendEmail to send email in JavaScript, however you could receive the below error:

« The e-mail message cannot be sent. Make sure the e-mail has a valid recipient. »

After searching the web, I found the solution: instead of using an email address for the recipients you have to use the userDomain with « i:0#.w| ».

For example, if the user is John Doe, and his email is john_doe@company.com, then you should use something like i:0#.w|domain\\john_doe.

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

*