Send Email with PowerShell

When I cannot send email from an application on a server, I use PowerShell to send an email to determine if it is the app our outside the application where the issue is.

Here is an example sending an email with the following info. You should replace this with your own names.
Mail Server: mail.example.com
Sender: testsender@example.com (Test Sender)
Recipient: testrecipient@example.com (Test Recipient)
Sending Server: SendingServerName

 send-mailmessage -SmtpServer "mail.example.com" -to "Test Recipient " -from "Test Sender " -subject "Test mail from SendingServerName"


Leave a Reply

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

fifteen − ten =