Well, this may have been answered, but I'm a beginner and try to study, so I think I donโt โgetโ it. I have a variable that contains a table of information (I got it from an SQL query). I can display the variable on the screen and look at the table, but when I try to create an HTML letter with it in the body, it becomes distorted.
Here is the code:
# This code sets up the HTML table in a more friendly format $style = "<style>BODY{font-family: Arial; font-size: 10pt;}" $style = $style + "TABLE{border: 1px solid black; border-collapse: collapse;}" $style = $style + "TH{border: 1px solid black; background: #dddddd; padding: 5px; }" $style = $style + "TD{border: 1px solid black; padding: 5px; }" $style = $style + "</style>"
The output on the screen is as follows:
35 FirstName LastName EMail Count --------- -------- ----- ----- John Doe John.Doe@blah.com 51 Jane Doe Jane.Doe@blah.com 20
... but the body of the email is as follows:
Here is a listing of open issues in IssueTrak, sorted by Next Action. Microsoft.PowerShell.Commands.Internal.Format.FormatStartData Microsoft.PowerShell.Commands.Internal.Format.GroupStartData Microsoft.PowerShell.Commands.Internal.Format.FormatEntryData Microsoft.PowerShell.Commands.Internal.Format.FormatEntryData
... etc. What am I doing wrong?
source share