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 / Send Email with a tabl...
Power Apps
Answered

Send Email with a table of filtered items from gallery , email is sending all the html code in subject

(0) ShareShare
ReportReport
Posted on by 102

Hi I am trying to create a feature where an end user can get a filtered gallery emailed to them with a click of a button

I have spent 6 hours researching this and have come up with code below , but it is not creating a table , all I see is all the html code in the email subject

 

and just the word true in body

 

ClearCollect(Acc, master_search.AllItems);
Office365.SendEmailV2(User().Email,
/*"CRM Accounts",*/
/*body*/
"<h3>CRM Filtered Accounts</h3>" & "<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" & "<tr style='background-color:#efefef'>
<th>Code</th><th>Account</th><th>Country</th><th>Region</th><th>Rep</th><th>Rep2</th><th>Status</th>
</tr>
<tr>" & Concat(
Acc,
"<td>" & Title & " </td>
<td>" & field_1 & " </td>
<td>" & field_2 & " </td>
<td>" & field_3 & " </td>
<td>" & field_4 & " </td>
<td>" & field_5 & " </td>
<td>" & field_6 & " </td>
",
"
</tr><tr>"
) & "</table>",
true
)

Categories:
  • Verified answer
    timl Profile Picture
    37,287 Super User 2026 Season 2 on at

    @JD_26 

    The second argument to SendEmailV2 is the subject - this is what you appear to be missing.

    ClearCollect(Acc, master_search.AllItems);
    Office365.SendEmailV2(
     User().Email,
     "Email Subject Line",
     "<h3>CRM Filtered Accounts</h3>" & 
     "<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" & "<tr style='background-color:#efefef'>
    <th>Code</th><th>Account</th><th>Country</th><th>Region</th><th>Rep</th><th>Rep2</th><th>Status</th>
    </tr>
    <tr>" & Concat(
     Acc,
     "<td>" & Title & " </td>
     <td>" & field_1 & " </td>
     <td>" & field_2 & " </td>
     <td>" & field_3 & " </td>
     <td>" & field_4 & " </td>
     <td>" & field_5 & " </td>
     <td>" & field_6 & " </td>
     " & "</tr><tr>"
     ) 
    & "</table>"
    )
  • Verified answer
    JD_26 Profile Picture
    102 on at

    Thanks , that has fixed it 

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 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard