I'm following an online course of building a PowerApp, and am stuck on the issue of sending a user an email. This is what the course provided for Syntax:
I put in the exact same code (while leaving out a few variables that weren't needed), but got these errors:
Would anyone know why it's throwing those two errors? Thank you!
(Here is the typed out version of my code that is erroring out):
Office365Outlook.SendEmail(popPeoplePicker.Selected.Mail, "Form routed to you! Hello " & popPeoplePicker.Selected.DisplayName & ",<p>A file has been sent to you for approval.<p>" & "<p>Sent from: " & varCurrentUser.FullName & "<p>" & popOptionalComments.Text, {IsHTML: true, Importance: "Normal"});
Thank you so much, that was exactly the solution to the issue I was having. Thanks again 🙂
The second parameter for the SendEmail action in the Office365Outlook connector is the subject of the message. So if you change your expression to the following, it should work:
Office365Outlook.SendEmail(
popPeoplePicker.Selected.Mail,
"<<the subject for your e-mail>>",
"Form routed to you! Hello " &
popPeoplePicker.Selected.DisplayName &
",<p>A file has been sent to you for approval.<p>" &
"<p>Sent from: " &
varCurrentUser.FullName &
"<p>" & popOptionalComments.Text,
{IsHTML: true, Importance: "Normal"});
Hope this helps!
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional