Avatar ·

SMTPLIB in Python with smtp.yandex.ru

📁 Advanced Python Topics, question, example, work

I use Python 3.4.3. I want to write a simple script that will send text information to a given mailbox. Found something. In interpreter mode I enter:

>>> import smtplib >>> server = smtplib.SMTP('smtp.yandex.ru', 465)

and the interpreter hangs tightly. I took the server info for Yandex.

UPD: if I use the same for Gmail:

server = smtplib.SMTP('smtp.gmail.com', 587)

everything works fine. However, I w