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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (26,884)