Project

Mailozaurr

Mailozaurr is a PowerShell module that aims to provide SMTP, POP3, IMAP and probably some other ways to interact with Email. Underneath it uses MimeKit and MailKit libraries written by Jeffrey Stedfast.

Stars218
Forks17
Open issues0
PowerShell Gallery downloads1226363
ReleaseMailozaurr-v2.0.1-Preview4
Language: C# Updated: 2026-04-11T10:18:50.0000000+00:00

Curated Examples

Test SMTP before sending

Use Mailozaurr to test SMTP capabilities and choose a safer send pattern.

This pattern is useful before adding SMTP sending to an operational script.

It comes from the source example at Examples/Example-TestSmtpConnection.ps1.

When to use this pattern

  • You need to confirm SMTP connectivity before sending mail.
  • You want to decide whether connection pooling is safe.
  • You are adding a WhatIf-protected send path to a script.

Example

Import-Module .\Mailozaurr.psd1 -Force

$info = Test-SmtpConnection -Server 'smtp.example.com' -Port 587

$poolSettings = if ($info.Persistent) {
    @{ UseConnectionPool = $true; ConnectionPoolSize = 2 }
} else {
    @{}
}

Send-EmailMessage -From 'sender@example.com' -To 'recipient@example.com' -Server 'smtp.example.com' @poolSettings -WhatIf

What this demonstrates

  • testing the transport before sending
  • using SMTP capability data to shape the send path
  • keeping the example safe with WhatIf

Source