cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

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
Community Support

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
Highlighted
Skilled Sharer
Skilled Sharer

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"}

 

Highlighted
Helper V
Helper V

Re: Sending an email body text format

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

 

Highlighted
Skilled Sharer
Skilled Sharer

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"}
)

Highlighted
Helper V
Helper V

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?

Highlighted
Skilled Sharer
Skilled Sharer

Re: Sending an email body text format

For new line use <br>.

 

please share your code so that we can check.

 

 

Highlighted
Helper V
Helper V

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

Highlighted
Skilled Sharer
Skilled Sharer

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
Community Support

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (7,278)