Microsoft deprecated Send-MailMessage in PowerShell. The official docs now say "This cmdlet does not guarantee secure connections to SMTP servers" and recommend against using it. But thousands of production scripts still depend on it for alerts, reports, and automation.

The replacement options aren't great. Send-MgUserMessage requires Microsoft...