cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Data table as body of email

@WarrenBelz I am creating an app that will gather information about a new hire and what equipment they will need. I am now at the point where I need to take the data and send it as an email. I have already created an HTMLtext document that will house all my gathered data. However, I am having issues collecting the HTMLtext document and sending it to my email. Below will be a copy of my HTMLtext document.

 

Thank You

 

 

 

 

"<table width='100%' border='1' cellpadding='5' style='border:1px solid black; border-collapse:collapse'>" &
    "<tr style='background-color:#efefef'>
        <th>StartDate</th>
	<th>FirstName</th>
        <th>LastName</th>
        <th>Community</th>
	<th>Position</th>
	<th>Supervisor</th>
	<th>Microsoft</th>
	<th>DropBox</th>
	<th>Concur</th>
	<th>Upkeep</th>
	<th>Eldermark</th>
	<th>EMAR</th>
	<th>SM</th>
	<th>MM</th>
	<th>Phone</th>
	<th>Laptop</th>
	
    </tr>" &
    Concat(Data,
    "<tr>
        <td>" & Date & " </td>
        <td>" & FirstName & " </td>
        <td>" & LastName & " </td>
	<td>" & Community & " </td>
	<td>" & Position & " </td>
	<td>" & Supervisor & " </td>
	<td>" & Microsoft & " </td>
	<td>" & DropBox & " </td>
	<td>" & Concur & " </td>	
	<td>" & Upkeep & " </td>
	<td>" & Eldermark & " </td>
	<td>" & EMAR & " </td>
	<td>" & SM & " </td>
	<td>" & MM & " </td>
	<td>" & Phone & " </td>
	<td>" & Laptop & " </td>
    </tr>") &
    "</table>"

 

 

 

 

 

13 REPLIES 13

@Durell_T I think you need to specify that the body is HTML:

'Outlook.com'.SendEmail ( "GrandITSUPP@outlook.com", "New Hire Form" ,  "<span>" & HtmlText1.HtmlText & "<span>", {IsHTML: true})

 

Frequent Visitor

@TJO It didn't like that code unfortunately so I modified it. Below is the new version but it doesn't like one bracket in front of "IsHTML:  true". I feel like we're getting close to fixing my issue though.

 

'Outlook.com'.SendEmail ( "GrandITSUPP@outlook.com", "New Hire Form" ,  "<span>" & HtmlText1.HtmlText & "<span>") {IsHTML: true})

 

 

@Durell_T Maybe you can omit the curly brackets. Anyways the closing bracket after ...span>") needs to be replaced by a comma

Frequent Visitor

Awesome, now it sends the table I need. I will put a copy of the code up for anyone trying to send a table in the future. This will work as long as you set up the connector under Outlook.com and verify it with an email address. Thank you vert much @TJO and @v-yutliu-msft  for all your help I will now mark this issue as fixed.

 

'Outlook.com'.SendEmail ( "Name@ANYEMAIL.COM", "ANY TITLE" ,  "<span>" & HTLMDOCUMENT.HtmlText & "<span>", {IsHtml: true})

 

 

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (76,223)