Embede multiple HTML files in e-mail body

I have five HTML files & try to embed all these to e-mail body.
Example below:

E-mail body must look like below:

The below contains D1 information
Embed 1.HTML

The below contains D2 information
Embed 2.HTML

I wrote a script, but it is not getting me the desired output:
$body = get-content .\content.htm
$message.body = $body


Do you need the name of each html file in email body or the contents of each html file in email body?

$a = ""
$a = $a + "BODY{background-color:white;FONT-SIZE: 8pt; FONT-FAMILY: verdana}"
$a = $a + "TABLE{border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse;}"
$a = $a + "TH{border-width: 1px;padding: 3px;border-style: solid;border-color: black;color: red;background-color:#CCCCCC}"
$a = $a + "TD{border-width: 1px;padding: 3px;border-style: solid;border-color: black;background-color:white}"
$a = $a + ""


get-process |ConvertTo-HTML -head $a | out-file test.htm


get-service |ConvertTo-HTML -head $a -body '' | out-file test.htm  -append

There are supposed to be to html breaks in between the quoutes in the second command. forum removes them.

Thanks. Worked fine.


Doesn’t this literally make two separate HTML files and cram them together in the same file giving the file two HEAD sections? I see that Vakat said it works, but is it the best way to do it?