I was helping a customer today troubleshoot a VM to email issue and was tired of using my standard “send email via telnet” method to test the SMTP server. After a bit of research, it’s really easy to send email with powershell in a single command.
Here you go:
Send-MailMessage -SMTPServer localhost -To emailaddy@domain.tld -From localaddy@domain.ltd -Subject "test email" -Body "PowerShell for the win!"