11/20/2022 0 Comments Telnet scripting tool v1 0You can enter a different port than port 25 and test the port that you like. In this example, we will test the anonymous SMTP relay with port 25. You like to know that SMTP works, and you need to test the SMTP connection. Write-host -foregroundcolor yellow "Subject : $Subject"Īfter preparing the SMTP PowerShell script, you will test the SMTP connection with EHLO, and HELO commands. Write-host -foregroundcolor yellow $command Write-host -foregroundcolor yellow "MAIL FROM: $from" Write-host -foregroundcolor yellow $Greet $writer = new-object System.IO.StreamWriter($stream) $socket = new-object ($RemoteHost, $Port) Write-host -n -foregroundcolor cyan ($encoding.GetString($buffer, 0, $read)) $Port, # Choose port number 25 or any other $RemoteHost, # Exchange Server host name or IP address Create a script folder if you don’t have one. Give it the name Test-SMTP-Telnet.ps1 and place it in the C:\scripts folder. No antivirus or security products block SMTP connectionsĭownload the Test-SMTP-Telnet.ps1 PowerShell script or copy and paste the below code in Notepad.HELO SMTP command and sent an email to recipient.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |