Curated Examples
Validate email addresses
Use Mailozaurr to validate email address strings from parameters or pipeline input.
This pattern is useful when an automation accepts address lists from files, forms, or another system.
It comes from the source example at Examples/Example-ValidateEmail.ps1.
When to use this pattern
- You accept email addresses from user input.
- You import recipients from CSV or another system.
- You want invalid values to be visible before sending.
Example
Import-Module .\Mailozaurr.psd1 -Force
$addresses = '[email protected]', 'broken-address', '[email protected]'
$addresses | Test-EmailAddress -Verbose | Format-Table
What this demonstrates
- validating parameter and pipeline input
- making bad addresses visible early
- keeping send workflows separate from validation