How to Launch Email in Power Apps

Are you aware of what Power Apps Launch Email is and how it works? Well, in this Power Apps tutorial, I will show you How to Launch Email in Power Apps in detail.

Also, we will see how to Launch Email Power Apps from a Button control with various examples.

Check out: Power Apps Modern Controls

How to Launch Email in Power Apps

By executing the Power Apps Launch function and providing a “mailto” URL, we can generate a new Outlook mail message while pre-populating the recipient, topic, and email body. In further detail, this post explains this approach.

Recently, I received a request asking me to open Outlook with a button click from a Power Apps form with a pre-populated Subject and Body. Normally, Power Automate may be used to send emails with ease, but in this case, we’ll utilize the “mailto” option instead.

Refer to the screenshot below that how it looks like:

Power Apps Launch Email

This is the overview of Power Apps Launch Email.

Read: Scan Barcodes using Power Apps Barcode Reader [Display Product Information]

Launch Email Power Apps from a Button

Here, we will see how to launch Email Power Apps from a Button control. Refer to the below different scenarios:

Example – 1:

  • The below image represents one Power Apps Button Control named Click and Launch Email. When a user will click on this button, then the new mail message will open in Outlook and pre-populate the subject and message as shown below.
Launch Email Power Apps from a Button
  • To work around this, select the Button control [Click and Launch Email] and apply the code below on its OnSelect property as:
OnSelect = Launch(
    "mailto: preeti@tsinfotechnologies.com",
    {
        Cc: "Bijay@tsinfotechnologies.com",
        Bcc: "Sushree@tsinfotechnologies.com",
        Subject: "Client Meeting",
        Body: "Today there is a meeting with Project Client. Please be available."
    }
)

Where,

  1. Launch = Power Apps Launch function helps to open a website or a canvas app.
  2. mailto = You might want to hardcode this value since this is the person who will receive the email.
  3. Cc = You might want to add this secondary email address to the email.
  4. Bcc = You can add a third-person email address.
  5. Subject = Provide the subject line of the email.
  6. Body = Enter the detailed description of the email.

Refer to the screenshot below.

How to Launch Email Power Apps from a Button

This is one way to Launch Email Power Apps from a Button.

Also, Check: How to Filter Gallery by Current User in Power Apps

Example – 2:

  • In this second example, you can see there is a form (Using some Power Apps Controls) in Power Apps and a Button control (SEND).
  • The user will provide the mail details and click on the SEND button. Then the message details will populate in Outlook as in the figure below.
Power Apps Launch Email
  • To achieve this, set the code below on SEND button’s OnSelect property as:
OnSelect = Launch(
    "mailto:" & cmbTo.Selected.DisplayName,
    {
        Cc: txtCc.Text,
        Bcc: txtBcc.Text,
        Subject: txtSubject.Text,
        Body: txtBody.Text
    }
)

Where,

  • cmbTo = This is a Combo box control where anyone can search and select the specific user to whom you want to send the email.

NOTE:

Instead of a Power Apps Text input control, we can use the combo box control to search Office365 users from the organization. For this, you need to add a Office365Users connector and set the code below in Combo box’s Items property:

Items = Office365Users.SearchUserV2(
    {
        searchTerm: Self.SearchText,
        top: 10,
        isSearchTermRequired: false
    }
).value

Then, select the Combo box control and set its DisplayFields property as:

DisplayFields = ["DisplayName"]

And also, disable the Allow multiple selections from the Combo box’s Properties pane as shown below.

Launch Email in Power Apps
  • txtCc = Text input control name of Cc.
  • txtBcc = Text input control name of Bcc.
  • txtSubject = Text input control name of Subject.
  • txtBody = Text input control name of Body.
How to launch email in power apps
  • Save, Publish, and Preview the Canvas app. Enter the email details (To, Cc, Bcc, Subject, Body)and then click on the SEND button. It will redirect to the Outlook screen directly and populate the whole Power Apps email message information.

This is how to Launch Email in Power Apps with button control.

Also, you may like some more Power Apps tutorials:

in this Power Apps tutorial, we discussed what is Power Apps Launch Email, How to Launch Email in Power Apps.

Also, we saw how to Launch Email Power Apps from a Button control with various examples.

>