It is necessary to send a letter via Telnet to the mail via SMPT server, yandex or gmail, here’s the SMTP session:

open smtp.yandex.ru 587 220 smtp1o.mail.yandex.net ESMTP <Want to use Yandex.Mail for you domain? Visit http://pdd.yandex.ru > EHLO host 250-smtp3o.mail.yandex.net 250-8BITMIME 250-PIPELINING 250-SIZE 42991616 250-STARTTLS 250-AUTH LOGIN PLAIN 250-DNS 250 ENHANCEDSTATUSCODES STARTTLS 220 Go ahead 

I do not understand what's next. It does not allow me to log in, I enter AUTH LOGIN, immediately writes: the connection to the host has been lost. Maybe I’ve read it somewhere, need to connect using the StartTLS option in OpenSSL to convert a normal connection to an encrypted one? Stopped in one place! Tell me, who knows! In general, the purpose of sending a letter through winsock!

  • @Naruto, If you are given an exhaustive answer, mark it as correct (click on the check mark next to the selected answer). - Vitalina

1 answer 1

SMTP in its pure form does not allow working with ssl and through telnet it will not work to pass SSL authorization on the server, telnet works only with sending and receiving text messages. And if you need to send letters through winsock, then working with telnet is not required, it has its own mechanisms. Here is an article about sending via openssl, quite clearly described what you can understand if you want.

  • Where can I read about these mechanisms? - Naruto