Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Problem using Office365Outlook.SendEmail()

(0) ShareShare
ReportReport
Posted on by

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:

jharville_0-1600457466062.png

I put in the exact same code (while leaving out a few variables that weren't needed), but got these errors:

jharville_1-1600457525132.png

 

jharville_2-1600457547084.png

 

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"});

 

 

  • jharville Profile Picture
    on at
    Re: Problem using Office365Outlook.SendEmail()

    Thank you so much, that was exactly the solution to the issue I was having. Thanks again 🙂

  • Verified answer
    CarlosFigueira Profile Picture
    on at
    Re: Problem using Office365Outlook.SendEmail()

    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!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard