Send-MailMessage
CautionSend mail (legacy)
Send-MailMessage -To a@x -From b@x -Subject s -SmtpServer smtp
Sends via SMTP. Officially deprecated yet still common for internal alerts — plan a Graph migration.
Examples
Send-MailMessage -To [email protected] -From [email protected] -Subject 'Backup OK' -SmtpServer mail.corp.localNotify on job completion
Syntax
Send-MailMessage -To .. -From .. -Subject .. [-Body ..] [-SmtpServer ..] ※非推奨化に注意
Before you run it
Mind credentials and plaintext SMTP.
Related commands
- ConvertTo-HtmlHTML reports
- Get-MessageTraceTrace mail flow
The same reference, with no signal at all
Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.
Get it free on the App Store