# Email Body

Email Body on Evotec with practical examples, usage guidance, and reusable project workflows.

Project

PSWriteHTML

Generate HTML reports, dashboards, and emails from PowerShell without writing HTML, CSS, or JavaScript.

[View on GitHub](https://github.com/EvotecIT/PSWriteHTML) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteHTML/releases/tag/v1.41.0) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteHTML)

Stars**1025**

Forks**115**

Open issues**0**

PowerShell Gallery downloads**7576901**

Release**v1.45.0**

Language: PowerShell Updated: 2026-11-19

Curated Examples

An example script from the PSWriteHTML repository.

- Source repository: [https://github.com/EvotecIT/PSWriteHTML](https://github.com/EvotecIT/PSWriteHTML)
- Example group: `Example-Emails`

```powershell
Import-Module .\PSWriteHTML.psd1 -Force

if ($null -eq $Table) {
    $Table = (Get-Process | Select-Object -First 5 -Property Name, BasePriority, Company, CompanyName)
}
if ($null -eq $Table1) {
    $Table1 = (Get-ChildItem | Select-Object -First 5 -Property Name, BasePriority, Company, CompanyName)
}

$Output = EmailBody -FontSize 8px -FontFamily 'Tahoma' {
    EmailText -Text 'This should be font 8pt, table should also be font 8pt'
    EmailTable -Table $Table
    EmailText -LineBreak

    EmailTextBox -FontFamily 'Calibri' -Size 17 -TextDecoration underline -Color DarkSalmon -Alignment center {
        'Demonstration'
    }
    EmailText -LineBreak
    EmailTextBox -FontFamily 'Calibri' -Size 15 {
        "This is some text that's preformatted with Emoji 🤷 ‍️"
        "Adding more text, notice ths should be on next line"
        ""
        "Empty line above will cause a blank space. If you want to continue writting like you would do in normal email please use here strings as seen below."
        @"
                This is tricky but it works like one ❤
                big line... even thou we've split this over few lines
                already this will be one continues line. Get it right? 😎
"@
        ""
    }
    # This acts a bit differently
    EmailText -FontFamily 'Calibri' -Size 15 {
        "This is some text that's preformatted with Emoji 🤷 ‍️"
        "Adding more text, notice ths should be on next line"
        ""
        "Empty line above will cause a blank space. If you want to continue writting like you would do in normal email please use here strings as seen below."
        @"
                This is tricky but it works like one ❤
                big line... even thou we've split this over few lines
                already this will be one continues line. Get it right? 😎
"@
        ""
    } -LineHeight 1.5
    # Another way to do it
    EmailText -FontFamily 'Calibri' -Size 15 -Text @(
        "This is some text that's preformatted with Emoji 🤷 ‍️"
        "Adding more text, notice ths should be on next line"
        ""
        "Empty line above will cause a blank space. If you want to continue writting like you would do in normal email please use here strings as seen below."
        @"
                This is tricky but it works like one ❤
                big line... even thou we've split this over few lines
                already this will be one continues line. Get it right? 😎
"@
        ""
    ) -LineHeight 1.0

    EmailText -FontFamily 'Calibri' -Size 15 -Text @(
        "This is some text that's preformatted with Emoji 🤷 ‍️"
        "Adding more text, notice ths should be on next line"
        ""
        "Empty line above will cause a blank space. If you want to continue writting like you would do in normal email please use here strings as seen below."
        @"
                This is tricky but it works like one ❤
                big line... even thou we've split this over few lines
                already this will be one continues line. Get it right? 😎
"@
        ""
    ) -LineHeight 1.0, 2.5, 2.0, 0.5

    EmailList -FontSize 15 {
        EmailListItem -Text 'First item' -Color Red
        EmailListItem -Text '2nd item' -Color Green
        EmailList {
            EmailListItem -Text '3rd item' -FontStyle italic
            EmailListItem -Text '4th item' -TextDecoration line-through
        }
    }

    New-HTMLHeading -Heading h3 -HeadingText 'Another way' -Color Red

    EmailText -FontFamily 'Calibri' -Size 15 -Text "This is some text that's preformatted with Emoji 🤷 ‍️" -LineHeight 0.5
    EmailText -FontFamily 'Calibri' -Size 15 -Text "Adding more text, notice ths should be on next line" -LineHeight 0.5
    EmailText -FontFamily 'Calibri' -Size 15 -Text "" -LineHeight 1.0
    EmailText -FontFamily 'Calibri' -Size 15 -Text "Empty line above will cause a blank space. If you want to continue writting like you would do in normal email please use here strings as seen below." -LineHeight 1.75
    EmailText -FontFamily 'Calibri' -Size 15 -Text '' -LineHeight 0.5
    EmailText -FontFamily 'Calibri' -Size 15 -Text "    This is tricky but it works like one ❤" -LineHeight 0.5
    EmailText -FontFamily 'Calibri' -Size 15 -Text "      big line... even thou we've split this over few lines" -LineHeight 0.5
    EmailText -FontFamily 'Calibri' -Size 15 -Text "      already this will be one continues line. Get it right? 😎" -LineHeight 0.5

} -Online

Save-HTML -FilePath $PSScriptRoot\Output\TestBody.html -ShowHTML -HTML $Output
```

<!-- PowerForge markdown artifact sha256:2E5879C976796176FFEA155FFC3008D139B68A0A35E3124AF42DA5EC1C0B520C -->
