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 firstname.lastname@example.org -to email@example.com
If the email is successfully, the recipient will receive an email similar to this:
The email contains the following information:
- Originating Computer: Where the script was run from
- SMTP Server Address: The SMTP server that sent this email
- SMTP Server Port: default SMTP port is 25
- Return (sender) address: This does not have to be a real address
- Recipient: Where the email is sent to.