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.
- 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.
- 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"
- 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,
- User().Email defines the logged-in user’s email.
- HtmlText1.HtmlText indicates the Power Apps Html Text property name and value.
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.
This is how to send a formatted email Using Power Apps Html text control.
Conclusion
From this Power Apps Tutorial, we learned how to send a formatted email using Power Apps HTML Text control.
You may also like:
- Create PDF from Excel using Power Automate
- How to Sort a Power Apps Dropdown Control?
- Create PDF from Microsoft Forms via Power Automate
- How to use Power Apps label control?
- How to add text input to Power Apps collection?
After working for more than 15 years in Microsoft technologies like SharePoint, Office 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (9 times). I have also worked in companies like HP, TCS, KPIT, etc.