If you want to send an email via Powershell, e.g. to test if a local SMTP server is able to receive incoming email, you can use the following Powershell command:
Send-MailMessage -SmtpServer 192.168.1.10 -Port 25 -From email@example.com -To firstname.lastname@example.org -Subject test -Body test
Replace the example values in the command above to the credentials used in your situation:
- Servername (DNS) or IP address of the server which is able to receive email
- The port of the SMTP server. By default this is port 25.
- The email address of the sender.
- The email address of the receiver.
- Subject of the email.
- Body of the email.