cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Problem using Office365Outlook.SendEmail()

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

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Power Apps
Power Apps

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!

View solution in original post

2 REPLIES 2
Highlighted
Power Apps
Power Apps

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!

View solution in original post

Highlighted
Helper II
Helper II

Re: Problem using Office365Outlook.SendEmail()

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,608)