PowerShell Script: Test-SMTP

Written by Tao Yang

I wrote this simple script last week to test SMTP server by sending a testing email.

Usage: .\Test-SMTP.PS1 -smtp smtp.xxxx.com -port 25 -from test@xxxx.com -to recipient@xxxx.com

If the email is successfully, the recipient will receive an email similar to this:

image

The email contains the following information:

  1. Originating Computer: Where the script was run from
  2. SMTP Server Address: The SMTP server that sent this email
  3. SMTP Server Port: default SMTP port is 25
  4. Return (sender) address: This does not have to be a real address
  5. Recipient: Where the email is sent to.

One comment on “PowerShell Script: Test-SMTP

  1. Pingback: How can we tell which server is the active resource pool member? | Catapult Systems

Leave a Reply