web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Problem using Office36...
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"});

 

 

Categories:
I have the same question (0)
  • Verified answer
    CarlosFigueira Profile Picture
    on at

    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!

  • jharville Profile Picture
    on at

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

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard