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

Using HTML in an email

Hey guys!

 

I'm not sure how you can use HTML in an email sent in powerapps, I want to insert breaks and things like that but in between the lines there are lines of code like concat and things like that... is there a way to put HTML formatting to a specific portion. For instance a part of the code is:

 

Office365Outlook.SendEmail(PSDEmail_1,JobNumber_1 & " " & WellName_1 & " Run #" & Runnumber_1 & " Pre-job checklist",If(Dropdown_1.Selected.Value = "High tier","QHSE Considerations:"&Char(10)&Concat(QHSE.AllItems,label1.Text&": "&radio1.Selected.Value&Char(10)&"Comments: " & commentsinput.Text&Char(10)

 

and it continues, but I would like to be able to put QHSE considerations in bold and also not have to use char(10) everywhere for the line breaks, I find <br> much easier.

 

Thanks for your help in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Champion
Community Champion

Re: Using HTML in an email

Hi @jgutierrez79 ,,

you can absolutely use HTML in the email from Power Apps. See the below code:

Office365Outlook.SendEmail(
    varUserEmail,
    "Sample Email",
    "<table style='width:30%;border: 1px solid black;'>
  <tr>
    <th>First Name</th>
    <th>Lastname</th>
    <th>Age</th>
  </tr>
  <tr>
    <td>Jill</td>
    <td>Smith</td>
    <td>"&varTotal&"</td>
  </tr>
  <tr>
    <td>Eve</td>
    <td>Jackson</td>
    <td>94</td>
  </tr>
</table>",
    {IsHtml: true}
)

email.png


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

 

View solution in original post

6 REPLIES 6
Highlighted
Community Champion
Community Champion

Re: Using HTML in an email

Hi @jgutierrez79 ,,

you can absolutely use HTML in the email from Power Apps. See the below code:

Office365Outlook.SendEmail(
    varUserEmail,
    "Sample Email",
    "<table style='width:30%;border: 1px solid black;'>
  <tr>
    <th>First Name</th>
    <th>Lastname</th>
    <th>Age</th>
  </tr>
  <tr>
    <td>Jill</td>
    <td>Smith</td>
    <td>"&varTotal&"</td>
  </tr>
  <tr>
    <td>Eve</td>
    <td>Jackson</td>
    <td>94</td>
  </tr>
</table>",
    {IsHtml: true}
)

email.png


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

 

View solution in original post

Highlighted
Helper I
Helper I

Re: Using HTML in an email

Hey KrishnaV! thank you so much for your answer!

But I'm trying that and I'm getting the following error:

 
 

I have no idea why, this is how I'm writing the code 

f(WellIntegrityCB_1.Value=true, Concat(Wellintegrity.AllItems,label1_14.Text&": "&radio1_14.Selected.Value&Char(10)&"Comments: " & commentsinput_14.Text&Char(10))),{IsHTML:true, From:EmailInput_1, Cc:EmailInput_1})

that's the end part of the send email function I'm not sure why

 

Again, thank you so much in advance!

Highlighted
Helper I
Helper I

Re: Using HTML in an email

I also just tried using a simple line of code like this:

Office365Outlook.SendEmail("myemail@mycompany.com","Test","Test body",{IsHTML:true}) and it's saying the same, maybe I have to activate something 

Highlighted
Community Champion
Community Champion

Re: Using HTML in an email

Hi @jgutierrez79 ,

Use Concatenate(string1,string2.....) than Concat.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

Highlighted
Helper I
Helper I

Re: Using HTML in an email

Oh I'm such a noob! I was putting IsHTML instead of IsHtml sorry, I didn't know it was that important here

Highlighted
Community Champion
Community Champion

Re: Using HTML in an email

Hi @jgutierrez79 ,

 

I am glad that you found the syntax error and hope it is working for you now.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,605)