
As for the prerequisite, you will need to have telnet client enabled in your Windows OS. You may refer to this article, Enable Telnet in Windows Operating System
Launch the command prompt and follow the steps as below,
- Type nslookup and press Enter.
nslookup
- Type set type=mx and press Enter.
set type=mx
- Type the domain of the MX record. For example, itsiti.com and press Enter.
itsiti.com
The output of the above command. Take note on the MX preference = 10, mail exchanger = itsiti1.com.
itsiti.com MX preference = 10, mail exchanger = mail.itsiti1.com
mail.itsiti1.com internet address = 192.168.110.123
mail.itsiti2.com internet address = 192.168.110.456
- Now, open another session of command prompt and type telnet and press Enter. Type set localecho and press Enter again.
Welcome to Microsoft Telnet Client
Escape Character is 'CTRL+]'
Microsoft Telnet> set localecho
Local echo on
- Type OPEN mail.itsiti1.com 25 and press Enter. (*replace with mail exchanger value above). The output would similar as below,
220 TABCXX88FT088.mail.protection.outlook.com Microsoft ESMTP MAIL Service ready at Sun, 25 Dec 2022 08:25:38 +0000
- Type EHLO itsiti.com and press Enter. The output as below, (*replace with your email)
250-TABCXX88FT088.mail.protection.outlook.com Hello [123.45.67.89]
250-SIZE 123456
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250 SMTPUTF8
- Type MAIL FROM:<hello-boss@itsiti.com> and press Enter. (*replace with your email). The output as below,
250 2.1.0 Sender OK
- Type RCPT TO:bye-boss@itsiti.com NOTIFY=success,failure and press Enter. (*replace with your email). The output as below,
250 2.1.5 Recipient OK
- Type DATA and press Enter. The output as below,
354 Start mail input; end with <CRLF>.<CRLF>
- Type Subject: Test from SAP DEV System and press Enter.
Subject: Test from SAP DEV System
- Press Enter again. A blank line is needed between the Subject: field and the message body.
- Type Test Message and then press Enter.
Test Message
- Type a period ( . ) and then press Enter.
.
- Type Quit to close the telnet session.
You might want to refer to Microsoft article for more details.