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 / sending email to multi...
Power Apps
Answered

sending email to multiple people individually in powerapps

(0) ShareShare
ReportReport
Posted on by 42

i have people picker control  there i can select  multiple people i want to send the email selected people individually as below

 

Office365Outlook.SendEmail(_emails, "Applause", _htmlTable, {IsHtml:true,Importance:"Normal"});

 

in _email i have collection of multiple people and in _htmlTable i have formatting of userManagerName and Department

 

How can i loop each user and how to update _htmlTable values based on each User

Categories:
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @rajeshvsnk 

    I would consider the following.  

    First - have a placeholder in your htmlTable (which I assume is really a text variable, and not a table).  Have it something like [FULLNAME]  (ex. Hello [FULLNAME] )

     

    I do not know the structure of your _email collection, so I will assume it has an EmailAddress and a FullName column in it.  You'll need to adjust the proposed solution below to fit your scenario.

     

    Change your formula to the following:

    ForAll(_emails,
     Office365Outlook.SendEmail(EmailAddress, 
     "Applause", 
     Substitute(_htmlTable, "[FULLNAME]", FullName), 
     {IsHtml:true,Importance:"Normal"}
     )
    )

     

    That should give you what you are looking for.

     

    I hope this is helpful for you.

     

  • rajeshvsnk Profile Picture
    42 on at

    Can you pls explain with html content also.

    I am getting sysntax error substitute saying syntax wrong arguments

     Substitute(_htmlTable, "[FULLNAME]", FullName), 
     {IsHtml:true,Importance:"Normal"}

     

  • rajeshvsnk Profile Picture
    42 on at

    Hai Randy ,

    Thanks for your quick response.

    It working fine but i want to pass 5 parameter like email and name,department,manager & Designation 

    how we can do it

     

    ForAll(_emails,
     Office365Outlook.SendEmail(EmailAddress, 
     "Applause", 
     Substitute(_htmlTable, "[FULLNAME]", FullName), 
     {IsHtml:true,Importance:"Normal"}
     )
    )
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @rajeshvsnk 

    So, I'm assuming you got it to work.  Your first response seemed to indicate you were having problems, but your next response seemed to indicate you have it working.

     

    As for multiple substitutions, just nest them...like this example for three of them:

    ForAll(_emails,
     Office365Outlook.SendEmail(EmailAddress, 
     "Applause",
     Substitute( 
     Substitute(
     Substitute(_htmlTable, 
     "[FULLNAME]", FullName), 
     "[DEPARTMENT]", Department),
     "[DESIGNATION]", Designation
     ),
     {IsHtml:true,Importance:"Normal"}
     )
    )

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard