Send formatted email using Power Apps HTML Text control

In this Power Apps Tutorial, we will see discuss how to use the Power Apps HTML text control to send a formatted email to a user. We will see an example of how to Send formatted email using Power Apps HTML Text control.

Recently, we got a requirement to send an email to a user using an HTML text control while working with Power Apps canvas apps. That means when the user clicks on a button control, it will send an email to the specified user using the contents from the Power Apps HTML text control.

Send formatted email using Power Apps HTML Text control

In this section, we will see how to send a formatted email using Power Apps HTML Text control to a user.

To work with the above scenario, the following steps are:

  • Build a blank Power Apps canvas app (or you can use any existing apps) and connect the app with the Office365Outlook connector.
Power Apps HTML text control to Send formatted email
Power Apps HTML text control to Send formatted email
  • On the Power Apps screen, add a text label control and place it as the header of the screen.
  • Next, add an HTML Text control and expand the control to fit the screen.
Send email from the Power Apps HTML text control
Send an email from the Power Apps HTML text control
  • Suppose, I am going to add some details based on the “Monthly meeting” inside the Power Apps HTML text control using the HTML tags. For that, insert the below expression on the control’s HtmlText property.
HtmlText = "<H1><center><font color= Blue> TSINFO Monthly Meeting </font></center></H1> Dear employee, <br/> <p> We would like to invite you to attend our upcoming monthly meeting. The meeting will be held on <b>28th March 2023 at 4:00pm in 5th Floor Conference hall</b>. We kindly ask that you make every effort to attend as we will be discussing important updates and announcements related to our company.</p>Thank you for your attention and we look forward to seeing you there.<br/><br/>Best regards,<br/>Team HR<br/>TSInfo"
Sending an email body text format using Power Apps HTML text control
Sending an email body text format using Power Apps HTML text control
  • Next, add a button control to the screen and place it under the HTML text control. When the user clicks on the button, it will send an email to the specific person.
  • Insert the below expression on the button’s OnSelect property.
OnSelect = Office365Outlook.SendEmail(User().Email, "Meeting Notification", HtmlText1.HtmlText,{IsHtml:true})

Where,

  1. User().Email defines the logged-in user’s email.
  2. HtmlText1.HtmlText indicates the Power Apps Html Text property name and value.
Send formatted email using Power Apps HTML text control
Send formatted email using Power Apps HTML text control

That’s it! Let’s save, and publish the app. When the button is clicked, we can see a formatted email will send to the logged-in user’s outlook.

How to send a formatted email Using Power Apps Html text control
How to send a formatted email Using Power Apps Html text control

This is how to send a formatted email Using Power Apps Html text control.

See also  Power Apps Get Value Of Choice Field Dataverse

Conclusion

From this Power Apps Tutorial, we learned how to send a formatted email using Power Apps HTML Text control.

You may also like:

>