Exchange Server – Test SMTP Connection Without SSL Using PowerShell

PowerShell can be used to quickly check the functionality of the SMTP service in Exchange Server environments. Connections made without SSL/TLS, especially over port 25, can be easily tested using this method.

The following PowerShell script allows you to send a test email to the specified SMTP server without using SSL.

Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn

$TestEmailMessage = @{
    To         = "to-mail@msftadvocate.com"
    From       = "from-mail@msftadvocate.com"
    Subject    = "Test email"
    Body       = "Test email sent using SMTP Connection Without SSL"
    SmtpServer = "localhost"
    Port       = "25"
}
 
Send-MailMessage @TestEmailMessage

Leave a Reply

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

Back To Top