telnet is a deprecated, insecure tool, should not be used today. There are a number of alternatives that do exactly the same.
You can use curl, like:
curl -vv telnet://smtp.gmail.com 25
Or a better choice, netcat (nc)
% nc smtp.gmail.com 25
220 smtp.gmail.com ESMTP q4sm20247148wrs.56 - gsmtp
QUIT
221 2.0.0 closing connection q4sm20247148wrs.56 - gsmtp
But my favourite for this kinds of tests, where we connect to the port 25 and test starttls using openssl s_client:
% openssl s_client -connect smtp.gmail.com:25 -starttls smtp
CONNECTED(00000005)
depth=2 C = US, O = Google Trust Services LLC, CN = GTS Root R1
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=1 C = US, O = Google Trust Services LLC, CN = GTS CA 1C3
verify return:1
depth=0 CN = smtp.gmail.com
verify return:1
---
Certificate chain
0 s:CN = smtp.gmail.com
i:C = US, O = Google Trust Services LLC, CN = GTS CA 1C3
1 s:C = US, O = Google Trust Services LLC, CN = GTS CA 1C3
i:C = US, O = Google Trust Services LLC, CN = GTS Root R1
2 s:C = US, O = Google Trust Services LLC, CN = GTS Root R1
i:C = BE, O = GlobalSign nv-sa, OU = Root CA, CN = GlobalSign Root CA
---
Server certificate
-----BEGIN CERTIFICATE-----
...
kI874CaqNTs=
-----END CERTIFICATE-----
subject=CN = smtp.gmail.com
issuer=C = US, O = Google Trust Services LLC, CN = GTS CA 1C3
---
No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: ECDSA
Server Temp Key: X25519, 253 bits
---
SSL handshake has read 4569 bytes and written 429 bytes
---
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Server public key is 256 bit
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
---
250 SMTPUTF8
QUIT
DONE