cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
d3ell
Level: Powered On

Sending an email body text format

Hi,

 

We have moved all our data now from access to powerapps and sharepoint online.  What this seems to be missing is a simple way of creating a report based on the forms that have been created.  I have watched hours of videos on youtube and the only way to do this seems to be very complicated and include using flow. I'm surprised that such a great platform doesnt have a way to produce a simple report!?

 

In light of the above i belive the best way that i can send the report data to our clients is via a simple email.  I have created the button and i am in the middle of creating the email, however in the body i would like to have some of the writing large, some in bold etc etc.  I belive that html is required for this and if you press "," after filling out the body you get the choice of "IsHtml" I dont really understand how to use this function, can anybody assist as i cant find much info about this on the net?  The code below obviously doesnt work, however i hope you can see what im trying to achieve!?

Office365.SendEmail(
    ThisItem.Email_Address,
    "Customer Care Report for " & ThisItem.Development & " Plot " & ThisItem.Plot_No & "  (Bell Ref: " & ThisItem.BellRef & ")", <font size="10"> "Bell Customer Report"</font> & Char(10) &
    <b>"Customer Name: "</b> & ThisItem.Customer_Forename & " " & ThisItem.Customer_Surname, {IsHtml:true}
    {Importance: "Normal"}
)

 

Any assistance appreciated!  - I understand, i'm probably approaching this in the wrong way, but if you can point me in the correct direction then i'm sure i'll work it out!

 

Thanks

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Sending an email body text format

Hi @d3ell,

Based on the formula that you provided, I think there is something wrong with it.

Please modify your formula as below:

Office365.SendEmail(
       "email address here",
       "Customer Care Report for " & ThisItem.Development & " Plot " & ThisItem.Plot_No & " (Bell Ref: " &ThisItem.BellRef & ")", 
       "<font size=10> Bell Customer Report</font><br> <b>Customer ForeName: </b>"& Customer_Forename & "<br><b>Customer Surname: </b>"& Customer_Surname, 
        {
           IsHtml:true,
           Importance: "Normal"
       }
)

Note: The Char(10) and Char(13) function in PowerApps would not work in HTML code (as above). Please use the link break HTML tag (“<br>”) to identify where you want a new line character.

Please check and see if the following thread would help in your scenario:

https://powerusers.microsoft.com/t5/Expressions-and-Formulas/Data-Table-to-Email-in-PowerApps/m-p/18...

 

More details about sending HTML email reporting in PowerApps, please check the following blog:

https://powerapps.microsoft.com/en-us/blog/html-email-reporting-with-tabular-data/

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
panand99
Level 10

Re: Sending an email body text format

There is comma missing between IsHtml and Importance. 

and all between one curly bracket

 

{IsHtml:true,Importance:"Normal"}

 

d3ell
Level: Powered On

Re: Sending an email body text format

I've tried your suggestion, still getting lots of red squiggly lines (see attached screenshot)

 

panand99
Level 10

Re: Sending an email body text format

change the field as required :

 

Office365.SendEmail(
TextInput6.Text,
"Customer Care Report for " & TextInput6.Text & " Plot " & TextInput6.Text & " (Bell Ref: " &TextInput6.Text & ")", "<font size=10> Bell Customer Report</font> "& Char(10) &"<b>Customer Name: </b>"& TextInput1.Text, {IsHtml:true,Importance: "Normal"}
)

d3ell
Level: Powered On

Re: Sending an email body text format

Hi There,

 

The sqiggly red lines have gone now, however on the email when it is received it doesnt show the data from the currently selected item. - I have changed the code you gave me to Thisitem.CustomerName and nothing appears.  the code also now doesnt seem to be creating a new line with the Char(10) code.

 

Picture of email received attached - Any thoughts on this?

panand99
Level 10

Re: Sending an email body text format

For new line use <br>.

 

please share your code so that we can check.

 

 

d3ell
Level: Powered On

Re: Sending an email body text format

Office365.SendEmail(
"email address here",
"Customer Care Report for " & ThisItem.Development & " Plot " & ThisItem.Plot_No & " (Bell Ref: " &ThisItem.BellRef & ")", "<font size=10> Bell Customer Report</font><br> <b>Customer ForeName: </b>"& Customer_Forename <br><b>Customer Surname: </b>"& Customer_Surname, {IsHtml:true,Importance: "Normal"}
)

 

Any thoughts - I seem to be getting a lot of red squiggly lines again. See pic attached

panand99
Level 10

Re: Sending an email body text format

Office365.SendEmail(
"emailaddress",
"Customer Care Report for " & TextInput1.Text& " Plot " & TextInput1.Text & " (Bell Ref: " &TextInput1.Text & ")", "<font size=10> Bell Customer Report</font><br> <b>Customer ForeName: </b>"& TextInput1.Text &"<br><b>Customer Surname: </b>"& TextInput1.Text, {IsHtml:true,Importance: "Normal"}
)

Update field name as per your requirement. It is worknig at my end.

Community Support Team
Community Support Team

Re: Sending an email body text format

Hi @d3ell,

Based on the formula that you provided, I think there is something wrong with it.

Please modify your formula as below:

Office365.SendEmail(
       "email address here",
       "Customer Care Report for " & ThisItem.Development & " Plot " & ThisItem.Plot_No & " (Bell Ref: " &ThisItem.BellRef & ")", 
       "<font size=10> Bell Customer Report</font><br> <b>Customer ForeName: </b>"& Customer_Forename & "<br><b>Customer Surname: </b>"& Customer_Surname, 
        {
           IsHtml:true,
           Importance: "Normal"
       }
)

Note: The Char(10) and Char(13) function in PowerApps would not work in HTML code (as above). Please use the link break HTML tag (“<br>”) to identify where you want a new line character.

Please check and see if the following thread would help in your scenario:

https://powerusers.microsoft.com/t5/Expressions-and-Formulas/Data-Table-to-Email-in-PowerApps/m-p/18...

 

More details about sending HTML email reporting in PowerApps, please check the following blog:

https://powerapps.microsoft.com/en-us/blog/html-email-reporting-with-tabular-data/

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,436)