web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Click a button in Powe...
Power Apps
Answered

Click a button in Power Apps to send an email

(0) ShareShare
ReportReport
Posted on by 116

Hey guys,

I'm using the Power Automate function "Click a button in Power Apps to send an email" in PowerApps.

Is it possible to add an collection of mails instead of one single as receiver? 

And if yes how should the collection be structured?

 

 

Categories:
I have the same question (0)
  • MarkRahn Profile Picture
    1,351 Super User 2026 Season 1 on at

    Hi @Cedric0404 

     

    I am going to assume you are following instructions similar to the following page:

    https://global-sharepoint.com/power-platform/powerapps/powerapps-send-email/?expand_article=1

     

    When you add a Flow to a Power App and select "Click a button in Power Apps to send an email", that is creating a Flow for you to use. That flow has three parameters. The one you are interested in is the first parameter "Sendanemail(V2)_To".

     

    For the OnSelect of a button, your code would be:

    ClickabuttoninPowerAppstosendanemail.Run("user1@yourdomain.com;user2@yourdomain.com;user2@yourdomain.com","Test Email","Test Body");

     

    The first parameter is the list of email addresses you want the email to go to separated by ";"

     

    If all you want to do is send an email, you could instead add a Connection to Office365Outlook and use the:

    Office365Outlook.SendEmailV2

    https://learn.microsoft.com/en-us/connectors/office365/#send-an-email-(v2

     

    This would keep everything within the App

     

    If you wanted to do it that way, take a look at this article by @mdevaney :

    https://www.matthewdevaney.com/power-apps-send-email-using-outlook-the-complete-guide/

     

    -Mark

     

    If this helped you get to a solution, please click on Accept as Solution below

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Cedric0404,

    If you just want to send an email, I think there is no need to use the flow, you could achieve this in Power Apps.

    Actually, that depends on if you want to send email for each user or send single email to multi users.

     

    Add a button and set the OnSelect property as below:

    ForAll(
     Collection As mailTo,
    
     Office365Outlook.SendEmailV2(
     mailTo.Email,
     TextInput_Subject.Text,
     "Hi " & mailTo.Name & ", <br><br>" & TextInput_Body.Text
     )
    )

    Or, to send  send single email to multi users. 

    Office365Outlook.SendEmailV2(
     Concat(Collection,Email,";"),
     TextInput_Subject.Text,
     "Hi " & mailTo.Name & ", <br><br>" & TextInput_Body.Text
     )
    )​
  • Cedric0404 Profile Picture
    116 on at

    Thank you for the answer! I want to send an single E-Mail to mulitple users. But how do I use or how do i add 

    Office365Outlook.SendEmailV2

    to power apps?

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    HI @Cedric0404,

    The second formula in my previous reply will do.

  • Cedric0404 Profile Picture
    116 on at

    Yes, but it says thats an unknown function. How do I fix that?

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @Cedric0404,

    Modify as below:

    Office365Outlook.SendEmailV2(
     Concat(Collection,Email,";"),
     TextInput_Subject.Text,
     TextInput_Body.Text
    )
  • Cedric0404 Profile Picture
    116 on at

    Okay, how would you create the Collection of E-Mails? because i did it with "collect" and it doesnt work for me like this.

  • MarkRahn Profile Picture
    1,351 Super User 2026 Season 1 on at

    Hi @Cedric0404 

     

    How are you building your Collection? Post some code on where your email addresses are coming from or provide a description.

     

    @v-qiaqi-msft  is really trying to help you. You should throw a Kudo or thumbs up their way.

     

    To use 

    Office365Outlook.SendEmailV2

    add a Data Connection like this:

    MarkBandR_0-1695726326472.png

    https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/connections/connection-office365-outlook

     

    -Mark

    If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

  • Cedric0404 Profile Picture
    116 on at

    Cedric0404_0-1695731844280.png

    so the add button you can see on the screenshots collects the mail entered in the textinput and reset it so another mail can be added to the collection. I want to send a mail now to this created collection of mails.

     

    Btw how do I throw a Kudo?😂

  • TKSHEP Profile Picture
    212 on at

    I am trying to send an email on submit button and have this formula, however I am getting an error on the Concat function says invalid arguments.  Any suggestions or help would be greatly appreciated. 

     

    Office365Outlook.SendEmailV2(Concat(SupEmail.Text, ";"), "New Document Submitted", "Please review and approve: " &" <a href="""&AppID&"?recordid="&EditForm.LastSubmit.'ID'&""">Link to Approve</a>",{Cc:RequestorEmail.Value});

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard