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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Sending an Email with ...
Power Apps
Unanswered

Sending an Email with a HTML Table

(0) ShareShare
ReportReport
Posted on by 3,271

Hi there. I have no idea or experience working with HTML. And I need to send an email with a HTML 

 

This is my current formula:

 

Office365Outlook.SendEmailV2(
CurrentUser.Email,
"email title here | Quote # " & First(Cart.QuoteNumber).QuoteNumber,
"<h3>Customer :</h3>" &
"<h3> Address :</h3>" &
"<h3>Contact :</h3>" &
"<h3>Title :</h3>" &
"<strong> Details: </strong>" & "<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" & "<tr style='background-color:#efefef'>
<th> H1 </th> <th> H2 </th> <th> H3 </th> <th> H4 </th> <th> H5 </th> <th> H6 </th> <th> H7 </th> <th> H8 </th>
</tr>
<tr>" & Concat(
Cart,
"<td>" & H1_Value & " </td>
<td>" & H2_Value & " </td>
<td>" & H3_Value & " </td>
<td>" & H4_Value & " </td>
<td>" & H5_Value & " </td>
<td>" & H6_Value & " </td>
<td>" & H7_Value & " </td>
<td>" & H8_Value & " </td>",
"</tr><tr>"
) & "</table>" & "<strong> Price: </strong>" & "<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" & "<tr style='background-color:#efefef'>
<th> T1 </th> <th> T2 </th> <th> T3 </th>
</tr>
<tr>" & Concat(
Cart,
"<td>" & HtmlText1.HtmlText & " </td>
<td>" & HtmlTextT2.HtmlText & " </td>
<td>" & HtmlTextT3.HtmlText & " </td>",
"</tr><tr>"
) & "</table>"
);

 

 

This is the output of this formula:

 

sajarac_0-1646312397737.png

 

And this is the way that I would like the output. But I am going mental trying to get this:

 

sajarac_1-1646312458083.png

 

Could a HTML expert please point me in the right direction?

 

thanks in advance,

 

Regards.

 

Categories:
I have the same question (0)
  • Verified answer
    Adrian_Celis Profile Picture
    1,652 Moderator on at

    Hi @sajarac 

     

    Try This. Simply replace the varYourValueHere with your desired value:

    "<h3>Customer : " & varYourValueHere & "</h3>" &
    "<h3> Address : " & varYourValueHere & "</h3>" &
    "<h3>Contact : " & varYourValueHere & "</h3>" &
    "<h3>Title : " & varYourValueHere & "</h3>" &
    "<strong> Building Details: </strong>" & "<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" & "<tr style='background-color:#efefef'>
    <th> H1 </th> <th> H2 </th> <th> H3 </th> <th> H4 </th> <th> H5 </th> <th> H6 </th> <th> H7 </th> <th> H8 </th>
    </tr>
    <tr style='text-align:center'>" & Concat(
    Cart,
    "<td>" & H1_Value & " </td>
    <td>" & H2_Value & " </td>
    <td>" & Text(H3_Value,"$ #,##0.00") & " </td>
    <td>" & H4_Value & " </td>
    <td>" & H5_Value & " </td>
    <td>" & H6_Value & " </td>
    <td>" & H7_Value & " </td>
    <td>" & H8_Value & " </td>",
    "</tr><tr>"
    ) & "</table>" & "<strong> Price Description: </strong>" & "<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" & "<tr style='background-color:#efefef'>
    <th> Tier 1 </th> <th> Tier 2 </th> <th> Tier 3 </th>
    </tr>
    <tr>" & Concat(
    Cart,
    "<td style='vertical-align:top'>" & HtmlTextT1.HtmlText & " </td>
    <td style='vertical-align:top'>" & HtmlTextT2.HtmlText & " </td>
    <td style='vertical-align:top'>" & HtmlTextT3.HtmlText & " </td>",
    "</tr>"
    ) & "
    <tr style='text-align:center; font-weight:bold'>
    <td>" & Text(varYourValueHere,"$ #,##0.00") & " </td>
    <td>" & Text(varYourValueHere,"$ #,##0.00") &" </td>
    <td>" & Text(varYourValueHere,"$ #,##0.00") & " </td>
    </tr>
    </table>"

     

  • Sajarac Profile Picture
    3,271 on at

    OMG!

    Sir, you are a HTML Master mind. My respects. Thanks you very much nice and easy and it works at the first try.

     

    A big thank you!!!!!!

  • Sajarac Profile Picture
    3,271 on at

    Good morning @Adrian_Celis , sorry to bother you. Just a silly question? 

    If I would like to add at the end of my email a picture, another line of text and also send the email with "Bcc". How can I do this?

     

    The picture is added to my powerapp as media.

     

    I have been trying this :

     

    <!DOCTYPE html>
    <html>
    <body>

    <h2>HTML Image</h2>
    <img src="pic_trulli.jpg" alt="Trulli" width="500" height="333">

    </body>
    </html>

     

    But no result.

     

    Thanks in advance.

  • Adrian_Celis Profile Picture
    1,652 Moderator on at

    Hi @sajarac 

    This maybe is good for another post since it's an extension to the original problem. If you want you can make a new post and then mention my username so I'll get notified. Or if someone will answer it first then that's also good.

    Thank you.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard