cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Durell_T
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})

 

Durell_T
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

Durell_T
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
User Groups Public Preview

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

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

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (35,905)