Power Apps is a robust platform that allows you to create custom business applications with ease and efficiency. One of the most common and useful functionalities within Power Apps is the ability to send emails.
This can be beneficial for various tasks, whether you need to notify users about important updates, automate workflows, or communicate with teams. Sending emails from Power Apps can streamline your processes and improve communication
Let’s take a look at the step-by-step process for sending emails from Power Apps
Office365Outlook.SendEmailV2(
"recipient email Id1;recipient email Id2",
"Email Subject",
"Email Body"
)

This gallery is connected to SharePoint list named EmpInfo as shown below.

To send an email from Power Apps, we need to add the Office 365 Outlook connector to the canvas app.
Sending an email using Office 365 outlook
Go to the Data pane, click on Add data and search for Outlook and select Office 365 Outlook data source.

Make sure, you add an email icon control inside gallery control.

Now, set the OnSelect property of the email icon control to the following formula.
Office365Outlook.SendEmailV2( ThisItem.Email, "Test email", "Power Apps send an email testing" )

Let’s understand the above formula.
The first argument, is recipients email ids. ThisItem.Email, will select the current employee’s email id in gallery control.
The second argument, is the subject line and the third argument is the email body.
Note that, for testing purpose we have provided the hard coded text for email subject and body. We can also use dynamic values, such as the values from other controls on the gallery or can get values from text input controls as well.
Now, test the email by running the app and click on email icon.

You can see that the email has been sent to the selected recipient.

Let’s open the email so you can see the preview.

Sending email with HTML content in email body
To send HTML content, you need to specify the email body as HTML as shown in below formula.
Office365Outlook.SendEmailV2( ThisItem.Email, "Test email", "<h2>Hello," & ThisItem.Name & " </h2><p>This is Power Apps testing email.</p>" )
Now, run the app and you can see HTML content in email body.

Adding BCCs and CCs recipients in emails
The Office 365 Outlook connector also enables you to send emails with CC and BCC recipients. You can include multiple email addresses for both CC and BCC.
To achieve this, you need to pass a record to the Office365.SendEmailV2 function, ensuring the Cc and Bcc fields are populated.
For example, the following syntax shows how to send an email with one CC and one BCC recipient.
Office365Outlook.SendEmailV2(
"recipient email ids",
"Email Subject", "Email Body",
{ Bcc:"BCCs recipients email ids",
Cc:"CCs recipients email ids" }
)
Let’s add BCCs and CCs email ids in above formula.


Setting the importance of an email message
You can also specify the importance of email messages, such as High, Normal, or Low, as demonstrated in the formula below.
In this example, we have set the importance of the email message to High.
Office365Outlook.SendEmailV2(
ThisItem.Email,
"Test email",
"Power Apps send an email testing",
{
Bcc: "BCCs recipients email ids",
CC:"CCs recipients email ids" ,
Importance: "High"
}
)

Let’s run the app, and you can see the importance of this email is marked as High.

Setting reply to email
Office365Outlook.SendEmailV2(
ThisItem.Email,
"Test email",
"Power Apps send an email testing",
{
Bcc:"BCCs recipients email ids",
Cc: "CCs recipients email ids",
Importance: "High",
ReplyTo: "noreply@xyz.com"
}
)
Now, when you run the app. You can see, when you reply on email it will show To email id as noreply@xyz.com.

If you want to send an email to all recipients, you can use the Concat function to combine all the recipients’ email addresses into a single text string, with each address separated by a semicolon (;). In our case, we want to send an email to all recipients listed in the gallery.
Let’s add a button control named Send email to all and set the OnSelect property of this button to the formula below.
Office365Outlook.SendEmailV2( Concat( gal_emp.AllItems, Email, ";" ), "Test email", "Sending email to all recipients" )
In, case if you want to send email to selected recipients listed in gallery then you can filter the data.
Below formula, will send an email to all recipients belongs to country India.
Office365Outlook.SendEmailV2( Concat( Filter( gal_emp.AllItems, Country = "India" ), Email, ";" ), "Test email", "Sending email to all recipients" )
Adding an attachment in email
You can also send an attachment over email. To send an attachment using the Office365Outlook.SendEmailV2 function, you need to pass a table of attachments to the function. The structure of this table must include the column names Name and ContentBytes.
Name column specifies the file name of the attachment and ContentBytes represent the actual data or content of the attachment in a binary format.
Let’s, send a image as an attachment over email. For this we will add image control.
Go to Insert tab and add a Add picture control.

Now, you can see Image control is added to screen.

Now, go to email icon and modify the formula to send an attachments over an email.
Office365Outlook.SendEmailV2(
ThisItem.Email,
"Test email",
"Power Apps send an email testing",
{
Attachments:Table(
{
Name: "PowerAppsLogo.jpg",
ContentBytes: UploadedImage1.Image
}
)
}
)

Run the app now. After that, select an attachment from the image uploader. Then click on email icon to send email.
As you can see, recipients receive an attachment over email.

Sending email using email screen template
The Power Apps email template screen is a pre-built screen that you can add to your app to allow users to send emails. This email screen that lets users send an email from their Office 365 Outlook account.
You can customize the email template screen to meet your specific needs.
For example, you can add additional controls to the screen, such as a control to select a template, a control to attach files, or a control to add CCs and BCCs.
It allows users to search for recipients in their orgs and add external email addresses, too. Lets, go to the New screen then select Email template.

Once, you add email screen template, you can see the screen looks like as shown below.

Let’s run the app to send an email to recipients. Now, search for users in your org, you can simply start typing their name in the text input box below To.
If you want to send an email to recipients outside your org, you can type out the full, valid email ids, and select the +Â icon that appears to the right of it.
After that, provide subject line and email body then click on send email button to send email.

Also Read..
ClearCollect function in Power Apps
Email validation in Power Apps
Highlight selected item in gallery
Gallery control : Design a gallery in Power Apps
Add Alternate background color to rows
Sort Items in gallery Power Apps
![]()
