Send Email with PowerShell

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 -Subject "test email" -Body "PowerShell for the win!"

Leave a Reply

Your email address will not be published. Required fields are marked *

9 − four =