cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

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
Super User III
Super User III

Hi @Anonymous ,,

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.

 


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.

Proud to be a Super User!

Regards,
KrishnaV
Business Applications MVP
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

6 REPLIES 6
Highlighted
Super User III
Super User III

Hi @Anonymous ,,

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.

 


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.

Proud to be a Super User!

Regards,
KrishnaV
Business Applications MVP
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

Highlighted
Anonymous
Not applicable

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
Anonymous
Not applicable

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

Hi @Anonymous ,

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.


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.

Proud to be a Super User!

Regards,
KrishnaV
Business Applications MVP
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.
Highlighted
Anonymous
Not applicable

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

Highlighted

Hi @Anonymous ,

 

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.


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.

Proud to be a Super User!

Regards,
KrishnaV
Business Applications MVP
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,852)